Remove endpoints for checking name uniqueness

The code which called these endpoints was removed:
- for services in https://github.com/alphagov/notifications-admin/pull/4084/files
- for organisations in https://github.com/alphagov/notifications-admin/pull/4128/files

Therefore these endpoints are no longer needed.
This commit is contained in:
Chris Hill-Scott
2022-01-11 16:15:40 +00:00
parent 5cd6fcbb4f
commit a4347a5165
4 changed files with 0 additions and 215 deletions

View File

@@ -940,21 +940,6 @@ def get_organisation_for_service(service_id):
return jsonify(organisation.serialize() if organisation else {}), 200
@service_blueprint.route('/unique', methods=["GET"])
def is_service_name_unique():
service_id, name, email_from = check_request_args(request)
name_exists = Service.query.filter_by(name=name).first()
email_from_exists = Service.query.filter(
Service.email_from == email_from,
Service.id != service_id
).first()
result = not (name_exists or email_from_exists)
return jsonify(result=result), 200
@service_blueprint.route('/<uuid:service_id>/data-retention', methods=['GET'])
def get_data_retention_for_service(service_id):
data_retention_list = fetch_service_data_retention(service_id)