Fix confirmation message
This commit is contained in:
parent
985060a0a6
commit
08f29acf5c
|
@ -81,6 +81,9 @@ export default {
|
||||||
'Content-Type': 'application/vnd.api+json'
|
'Content-Type': 'application/vnd.api+json'
|
||||||
}
|
}
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
|
this.errors = []
|
||||||
|
this.messages = []
|
||||||
|
|
||||||
const title = data.data.attributes.title
|
const title = data.data.attributes.title
|
||||||
this.messages.push(`Session ${title} has been created.`)
|
this.messages.push(`Session ${title} has been created.`)
|
||||||
|
|
||||||
|
@ -88,9 +91,6 @@ export default {
|
||||||
|
|
||||||
this.form.body = ''
|
this.form.body = ''
|
||||||
this.form.title = ''
|
this.form.title = ''
|
||||||
|
|
||||||
this.errors = []
|
|
||||||
this.messages = []
|
|
||||||
}).catch(({ response: { data } }) => {
|
}).catch(({ response: { data } }) => {
|
||||||
this.errors = _(data.errors).map('detail').value()
|
this.errors = _(data.errors).map('detail').value()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue