Implement posting announcements
This commit is contained in:
parent
e5b49ae34b
commit
e494e74643
4 changed files with 136 additions and 1 deletions
|
|
@ -53,6 +53,12 @@ const announcements = {
|
|||
const interval = store.state.fetchAnnouncementsTimer
|
||||
store.commit('setFetchAnnouncementsTimer', undefined)
|
||||
clearInterval(interval)
|
||||
},
|
||||
postAnnouncement (store, { content, startsAt, endsAt, allDay }) {
|
||||
return store.rootState.api.backendInteractor.postAnnouncement({ content, startsAt, endsAt, allDay })
|
||||
.then(() => {
|
||||
return store.dispatch('fetchAnnouncements')
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue