Allow editing announcements

This commit is contained in:
Tusooa Zhu 2022-03-17 17:11:53 -04:00 committed by tusooa
commit 89c49b6fb4
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
6 changed files with 118 additions and 23 deletions

View file

@ -65,6 +65,12 @@ const announcements = {
return store.dispatch('fetchAnnouncements')
})
},
editAnnouncement (store, { id, content, startsAt, endsAt, allDay }) {
return store.rootState.api.backendInteractor.editAnnouncement({ id, content, startsAt, endsAt, allDay })
.then(() => {
return store.dispatch('fetchAnnouncements')
})
},
deleteAnnouncement (store, id) {
return store.rootState.api.backendInteractor.deleteAnnouncement({ id })
.then(() => {