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