Add broadcasts to the dashboard

Shows current and previous broadcasts. Does not add a page for viewing
an individual broadcast.

Broadcasts are split into live and previous.

Draft broadcasts are excluded from the dashboard.
This commit is contained in:
Chris Hill-Scott
2020-07-09 15:48:56 +01:00
parent 78bda9d267
commit 6b822f9fde
7 changed files with 237 additions and 36 deletions

View File

@@ -24,6 +24,9 @@ class BroadcastMessageAPIClient(NotifyAdminAPIClient):
return broadcast_message
def get_broadcast_messages(self, service_id):
return self.get(f'/service/{service_id}/broadcast-message')['broadcast_messages']
def get_broadcast_message(self, *, service_id, broadcast_message_id):
return self.get(f'/service/{service_id}/broadcast-message/{broadcast_message_id}')