mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-26 02:49:16 -04:00
Remove methods for checking service/org name uniqueness
We don’t use these now – instead we try to update the name and see if it works or not.
This commit is contained in:
@@ -81,12 +81,6 @@ class OrganisationsClient(NotifyAdminAPIClient):
|
||||
data = _attach_current_user({})
|
||||
return self.delete(endpoint, data)
|
||||
|
||||
def is_organisation_name_unique(self, org_id, name):
|
||||
return self.get(
|
||||
url="/organisations/unique",
|
||||
params={"org_id": org_id, "name": name}
|
||||
)["result"]
|
||||
|
||||
def get_services_and_usage(self, org_id, year):
|
||||
return self.get(
|
||||
url=f"/organisations/{org_id}/services-with-usage",
|
||||
|
||||
@@ -319,14 +319,6 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
self._delete_template_cache_for_service(service_id)
|
||||
return self.post(endpoint, data=data)
|
||||
|
||||
def is_service_name_unique(self, service_id, name, email_from):
|
||||
"""
|
||||
Check that the service name or email from are unique across all services.
|
||||
"""
|
||||
endpoint = "/service/unique"
|
||||
params = {"service_id": service_id, "name": name, "email_from": email_from}
|
||||
return self.get(url=endpoint, params=params)["result"]
|
||||
|
||||
# Temp access of service history data. Includes service and api key history
|
||||
def get_service_history(self, service_id):
|
||||
return self.get('/service/{0}/history'.format(service_id))['data']
|
||||
|
||||
Reference in New Issue
Block a user