Move Vue into the vuejs directory

This commit is contained in:
Oliver Davies 2019-06-05 19:23:45 +01:00
parent a4b018204d
commit d7c864b63b
21 changed files with 13 additions and 15 deletions

View file

View file

View file

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View file

@ -80,22 +80,20 @@ export default {
'Authorization': 'Basic YXBpOmFwaQ==',
'Content-Type': 'application/vnd.api+json'
}
}).then(({ data: { data: { attributes } } }) => {
const title = attributes.title
this.messages.push(`Session ${title} has been created.`)
this.$emit('submitted', data)
this.form.body = ''
this.form.title = ''
this.errors = []
this.messages = []
}).catch(({ response: { data } }) => {
this.errors = _(data.errors).map('detail').value()
})
.then(({ data: { data } }) => {
const title = data.attributes.title
this.messages.push(`Session ${title} has been created.`)
this.$emit('submitted', data)
this.form.body = ''
this.form.title = ''
this.errors = []
this.messages = []
})
.catch(({ response: { data } }) => {
this.errors = _(data.errors).map('detail').value()
})
}
}
}