mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-22 06:49:35 +00:00
.
This commit is contained in:
1 parent
8754a2d93c
commit
2d65fe8f52
1 file changed
+5
-8
@@ -121,21 +121,18 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async save() {
|
async save() {
|
||||||
if (!(await this.v$.$validate()))
|
if (!(await this.v$.$validate())) return
|
||||||
return
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (this.team.id) {
|
if (this.team.id)
|
||||||
await this.$axios.post_auth(`v1/teams/${this.team.id}`, this.team)
|
await this.$axios.patch_auth(`v1/teams/${this.team.id}`, this.team)
|
||||||
this.$emit('update', this.team)
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
await this.$axios.post_auth(`v1/teams`, this.team)
|
await this.$axios.post_auth(`v1/teams`, this.team)
|
||||||
this.$emit('update', this.team)
|
|
||||||
|
|
||||||
|
this.$emit('update', this.team)
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast(error)
|
this.$toast.error(error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user