mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-16 10:12:32 -05:00
clients: cbc_proxy actions accepts areas param
related: https://github.com/alphagov/notifications-broadcasts-infra/pull/23 Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk>
This commit is contained in:
@@ -20,10 +20,19 @@ def send_broadcast_event(broadcast_event_id, provider='stub-1'):
|
||||
f'msgType {broadcast_event.message_type} to {provider}'
|
||||
)
|
||||
|
||||
areas = [
|
||||
{"description": desc, "polygon": polygon}
|
||||
for desc, polygon in zip(
|
||||
broadcast_event.transmitted_areas["areas"],
|
||||
broadcast_event.transmitted_areas["simple_polygons"],
|
||||
)
|
||||
]
|
||||
|
||||
cbc_proxy_client.create_and_send_broadcast(
|
||||
identifier=str(broadcast_event.id),
|
||||
headline="GOV.UK Notify Broadcast",
|
||||
description=broadcast_event.transmitted_content['body'],
|
||||
areas=areas,
|
||||
)
|
||||
|
||||
current_app.logger.info(
|
||||
|
||||
Reference in New Issue
Block a user