mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-17 04:59:37 -04:00
Paginate complaints page
The API now returns paginated complaint data, so the `/platform-admin/complaints` page can now be paginated.
This commit is contained in:
@@ -7,8 +7,9 @@ class ComplaintApiClient(NotifyAdminAPIClient):
|
||||
def __init__(self):
|
||||
super().__init__("a" * 73, "b")
|
||||
|
||||
def get_all_complaints(self):
|
||||
return self.get('/complaint')
|
||||
def get_all_complaints(self, page=1):
|
||||
params = {'page': page}
|
||||
return self.get('/complaint', params=params)
|
||||
|
||||
def get_complaint_count(self, params_dict=None):
|
||||
return self.get('/complaint/count-by-date-range', params=params_dict)
|
||||
|
||||
Reference in New Issue
Block a user