Fix empty title

This commit is contained in:
Oliver Davies 2019-06-05 20:37:45 +01:00
parent 623b9aa501
commit 985060a0a6

View file

@ -80,11 +80,11 @@ export default {
'Authorization': 'Basic YXBpOmFwaQ==', 'Authorization': 'Basic YXBpOmFwaQ==',
'Content-Type': 'application/vnd.api+json' 'Content-Type': 'application/vnd.api+json'
} }
}).then(({ data: { data: { attributes } } }) => { }).then(({ data }) => {
const title = attributes.title const title = data.data.attributes.title
this.messages.push(`Session ${title} has been created.`) this.messages.push(`Session ${title} has been created.`)
this.$emit('submitted', data) this.$emit('submitted', data.data)
this.form.body = '' this.form.body = ''
this.form.title = '' this.form.title = ''