Restructure govuk-alerts endpoint to be internal

In response to: https://github.com/alphagov/notifications-api/pull/3305#pullrequestreview-726672421

Previously this was added among the public /v2 endpoints, but it's
only meant for internal use. While only the govuk-alerts app would
be able to access it, the location and /v2 URL suggested otherwise.
This restructures the endpoint so it resembles other internal ones.
This commit is contained in:
Ben Thorner
2021-09-15 15:21:20 +01:00
parent d61ec50fb1
commit 6a53871455
7 changed files with 19 additions and 26 deletions

View File

@@ -81,7 +81,7 @@ def test_requires_admin_auth_should_allow_valid_token_for_request(client):
def test_requires_govuk_alerts_auth_should_allow_valid_token_for_request(client):
jwt_client_id = current_app.config['GOVUK_ALERTS_CLIENT_ID']
header = create_internal_authorization_header(jwt_client_id)
response = client.get('/v2/govuk-alerts', headers=[header])
response = client.get('/govuk-alerts', headers=[header])
assert response.status_code == 200