mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +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() {
|
||||
if (!(await this.v$.$validate()))
|
||||
return
|
||||
if (!(await this.v$.$validate())) return
|
||||
|
||||
try {
|
||||
if (this.team.id) {
|
||||
await this.$axios.post_auth(`v1/teams/${this.team.id}`, this.team)
|
||||
this.$emit('update', this.team)
|
||||
}
|
||||
if (this.team.id)
|
||||
await this.$axios.patch_auth(`v1/teams/${this.team.id}`, this.team)
|
||||
else
|
||||
await this.$axios.post_auth(`v1/teams`, this.team)
|
||||
this.$emit('update', this.team)
|
||||
|
||||
this.$emit('update', this.team)
|
||||
this.closeModal()
|
||||
} catch (error) {
|
||||
this.$toast(error)
|
||||
this.$toast.error(error)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user