chore(task): move cover image setter to store
This commit is contained in:
parent
fad72e091b
commit
ee3965eae9
2 changed files with 9 additions and 5 deletions
|
|
@ -409,6 +409,13 @@ export const useTaskStore = defineStore('task', {
|
|||
cancel()
|
||||
}
|
||||
},
|
||||
|
||||
async setCoverImage(task: ITask, attachment: IAttachment | null) {
|
||||
return this.update({
|
||||
...task,
|
||||
coverImageAttachmentId: attachment ? attachment.id : 0,
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
|||
Reference in a new issue