feat(mixins/Tasks#create): allow any properties

This commit is contained in:
Julien Fontanet 2023-09-28 15:20:45 +02:00 committed by Pierre Donias
parent 0e934c1413
commit a1bd96da6a
2 changed files with 3 additions and 2 deletions

View File

@ -135,10 +135,10 @@ export default class Tasks extends EventEmitter {
*
* @returns {Task}
*/
create({ name, objectId, userId = this.#app.apiContext?.user?.id, type }) {
create({ name, objectId, userId = this.#app.apiContext?.user?.id, type, ...props }) {
const tasks = this.#tasks
const task = new Task({ properties: { name, objectId, userId, type }, onProgress: this.#onProgress })
const task = new Task({ properties: { ...props, name, objectId, userId, type }, onProgress: this.#onProgress })
// Use a compact, sortable, string representation of the creation date
//

View File

@ -33,6 +33,7 @@
<!--packages-start-->
- @xen-orchestra/mixins minor
- @xen-orchestra/xapi minor
- vhd-lib patch
- xo-server-backup-reports patch