Fixed a bug where the author was still showed when it was already deleted

This commit is contained in:
konrad 2017-11-21 11:49:52 +01:00 committed by kolaente
parent 6fbc820db9
commit fb6354ce2c
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ export default {
{ {
text: 'Delete', text: 'Delete',
icon: 'trash', icon: 'trash',
action: this.deleteauthor, action: this.DeleteAuthor,
css: 'ui red icon button' css: 'ui red icon button'
}, },
{ {
@ -175,7 +175,7 @@ export default {
deleteBtnSuccess () { // Event helper function deleteBtnSuccess () { // Event helper function
this.$emit('delete-submit') this.$emit('delete-submit')
}, },
deleteauthor (obj) { DeleteAuthor (obj) {
this.showModal = true this.showModal = true
this.$on('delete-submit', function () { this.$on('delete-submit', function () {
HTTP.delete('authors/' + obj.ID.content) HTTP.delete('authors/' + obj.ID.content)
@ -183,7 +183,7 @@ export default {
console.log(response) console.log(response)
if (response.status === 200 && response.data.Message === 'success') { if (response.status === 200 && response.data.Message === 'success') {
this.success = 'The author was deleted successfully.' this.success = 'The author was deleted successfully.'
this.loadauthors() this.loadAuthors()
} }
}) })
.catch(e => { .catch(e => {