mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-11 09:27:56 -04:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user