mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[Merge] API
This commit is contained in:
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)
|
||||
}
|
||||
|
||||
@@ -418,9 +418,9 @@ export default {
|
||||
|
||||
try {
|
||||
if (this.task.id) {
|
||||
await this.$axios.post_auth(`v1/master-tasks/${this.task.id}`)
|
||||
await this.$axios.patch_auth(`v1/master-tasks/${this.task.id}`, this.task)
|
||||
} else {
|
||||
await this.$axios.post_auth('v1/mastertasks')
|
||||
await this.$axios.post_auth('v1/mastertasks', this.task)
|
||||
}
|
||||
|
||||
this.closeModal()
|
||||
|
||||
Reference in new issue
Block a user