Fix confirmation message

This commit is contained in:
Oliver Davies 2019-06-05 20:52:00 +01:00
parent 985060a0a6
commit 08f29acf5c

View file

@ -81,6 +81,9 @@ export default {
'Content-Type': 'application/vnd.api+json'
}
}).then(({ data }) => {
this.errors = []
this.messages = []
const title = data.data.attributes.title
this.messages.push(`Session ${title} has been created.`)
@ -88,9 +91,6 @@ export default {
this.form.body = ''
this.form.title = ''
this.errors = []
this.messages = []
}).catch(({ response: { data } }) => {
this.errors = _(data.errors).map('detail').value()
})