Allow broadcasts to be cancelled

Currently this is a `get` request from the dashboard. Once we have a page
for viewing an individual broadcast it should probably show there
instead and be a `get`/confirm/`post` loop like for deleting a template.
This commit is contained in:
Chris Hill-Scott
2020-07-10 09:16:36 +01:00
parent 23cd6b9c9e
commit 44e177b402
5 changed files with 62 additions and 7 deletions

View File

@@ -125,6 +125,13 @@ class BroadcastMessage(JSONModel):
service_id=self.service_id,
)
def cancel_broadcast(self):
broadcast_message_api_client.update_broadcast_message_status(
'cancelled',
broadcast_message_id=self.id,
service_id=self.service_id,
)
class BroadcastMessages(ModelList):