mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Use new API endpoint to get single contact list
When we first built the contact list feature this endpoint didn’t exist. Now it does we can remove the slightly cludgy looping-through-all-the-lists code.
This commit is contained in:
@@ -25,7 +25,10 @@ class ContactListApiClient(NotifyAdminAPIClient):
|
||||
return job
|
||||
|
||||
def get_contact_lists(self, service_id):
|
||||
return self.get('/service/{}/contact-list'.format(service_id))
|
||||
return self.get(f'/service/{service_id}/contact-list')
|
||||
|
||||
def get_contact_list(self, *, service_id, contact_list_id):
|
||||
return self.get(f'/service/{service_id}/contact-list/{contact_list_id}')
|
||||
|
||||
|
||||
contact_list_api_client = ContactListApiClient()
|
||||
|
||||
Reference in New Issue
Block a user