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

@@ -174,16 +174,6 @@ def get_organisation_users(organisation_id):
return jsonify(data=[x.serialize() for x in org_users])
@organisation_blueprint.route('/unique', methods=["GET"])
def is_organisation_name_unique():
organisation_id, name = check_request_args(request)
name_exists = Organisation.query.filter(Organisation.name.ilike(name)).first()
result = (not name_exists) or str(name_exists.id) == organisation_id
return jsonify(result=result), 200
def check_request_args(request):
org_id = request.args.get('org_id')
name = request.args.get('name', None)