Fixed a bug where the author was still showed when it was already deleted
This commit is contained in:
parent
6fbc820db9
commit
fb6354ce2c
|
@ -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 => {
|
||||||
|
|
Loading…
Reference in New Issue