Implement deleting announcement

This commit is contained in:
Tusooa Zhu 2022-03-17 15:07:04 -04:00 committed by tusooa
commit e877fedb0e
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
4 changed files with 42 additions and 1 deletions

View file

@ -59,6 +59,12 @@ const announcements = {
.then(() => {
return store.dispatch('fetchAnnouncements')
})
},
deleteAnnouncement (store, id) {
return store.rootState.api.backendInteractor.deleteAnnouncement({ id })
.then(() => {
return store.dispatch('fetchAnnouncements')
})
}
}
}