aboutsummaryrefslogtreecommitdiff
path: root/src/modules/announcements.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/announcements.js')
-rw-r--r--src/modules/announcements.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/announcements.js b/src/modules/announcements.js
index 2ab2600c..76cea154 100644
--- a/src/modules/announcements.js
+++ b/src/modules/announcements.js
@@ -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')
+ })
}
}
}