Files
notifications-api/app/v2/broadcast/__init__.py
Chris Hill-Scott 61c9e50ed9 Add public API endpoint to create emergency alerts
We know there is at least one system which wants to integrate with
Notify to send out emergency alerts, rather than creating them manually.

This commit adds an endpoint to the public API to let them do that.

To start with we’ll just let the system create them in a single call,
meaning they still have to be approved manually. This reduces the risk
of an attacker being able to broadcast an alert via the API, should the
other system be compromised.

We’ve worked with the owners of the other system to define which fields
we should care about initially.
2021-01-26 16:24:44 +00:00

11 lines
226 B
Python

from flask import Blueprint
from app.v2.errors import register_errors
v2_broadcast_blueprint = Blueprint(
"v2_broadcast_blueprint",
__name__,
url_prefix='/v2/broadcast',
)
register_errors(v2_broadcast_blueprint)