Rename API URLs for guest list to guest list

This is a small part of removing the term ‘white list’ from the API.

Once the admin app is pointed at these new URLs, we can remove the old
ones.
This commit is contained in:
Chris Hill-Scott
2020-07-14 16:26:32 +01:00
parent bc0cfed468
commit e9fed12a1e
2 changed files with 19 additions and 8 deletions

View File

@@ -561,6 +561,7 @@ def get_detailed_services(start_date, end_date, only_active=False, include_from_
@service_blueprint.route('/<uuid:service_id>/whitelist', methods=['GET'])
@service_blueprint.route('/<uuid:service_id>/guest-list', methods=['GET'])
def get_whitelist(service_id):
from app.models import (EMAIL_TYPE, MOBILE_TYPE)
service = dao_fetch_service_by_id(service_id)
@@ -578,6 +579,7 @@ def get_whitelist(service_id):
@service_blueprint.route('/<uuid:service_id>/whitelist', methods=['PUT'])
@service_blueprint.route('/<uuid:service_id>/guest-list', methods=['PUT'])
def update_whitelist(service_id):
# doesn't commit so if there are any errors, we preserve old values in db
dao_remove_service_whitelist(service_id)