Use new guest list API URLs

The API now[1] accepts requests on `…/guest-list` as well as
`…/whitelist`. This commit starts using the former, which means:
- the use of ‘whitelist’ is fully gone from the admin app
- the API can stop using it, at least in URLs

1. As of https://github.com/alphagov/notifications-api/pull/2928
This commit is contained in:
Chris Hill-Scott
2020-07-27 13:16:52 +01:00
parent 0d6ef2977d
commit e0cb487093
2 changed files with 26 additions and 2 deletions

View File

@@ -327,11 +327,11 @@ class ServiceAPIClient(NotifyAdminAPIClient):
return self.get(url='/service/{}/notifications/monthly?year={}'.format(service_id, year))
def get_guest_list(self, service_id):
return self.get(url='/service/{}/whitelist'.format(service_id))
return self.get(url='/service/{}/guest-list'.format(service_id))
@cache.delete('service-{service_id}')
def update_guest_list(self, service_id, data):
return self.put(url='/service/{}/whitelist'.format(service_id), data=data)
return self.put(url='/service/{}/guest-list'.format(service_id), data=data)
def get_inbound_sms(self, service_id, user_number=''):
# POST prevents the user phone number leaking into our logs