[Merge] API

This commit is contained in:
Matej Glasnák committed 2023-01-31 15:56:25 +01:00
commit 9d1fd6c16b
11 files changed
+35 -34

No files matched your search

@@ -37,9 +37,10 @@ export default {
async complete() {
try {
await this.$axios.post(`v1/tasks/${this.task.id}`, {...this.task, is_finished: true})
const task = {...this.task, is_finished: true}
await this.$axios.patch_auth(`v1/tasks/${this.task.id}`, task)
this.visible = false
this.$emit('task-completed', this.task)
this.$emit('task-completed', task)
} catch (error) {
this.$toast.error(error)
}