mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-16 20:49:00 -04:00
Use arguments rather than passing around a dict
This makes it harder to write code which will pass tests but fail in real life.
This commit is contained in:
@@ -3,8 +3,19 @@ from app.notify_client import NotifyAdminAPIClient
|
||||
|
||||
class PerformanceDashboardAPIClient(NotifyAdminAPIClient):
|
||||
|
||||
def get_performance_dashboard_stats(self, params_dict=None):
|
||||
return self.get("/performance-dashboard", params=params_dict)
|
||||
def get_performance_dashboard_stats(
|
||||
self,
|
||||
*,
|
||||
start_date,
|
||||
end_date,
|
||||
):
|
||||
return self.get(
|
||||
'/performance-dashboard',
|
||||
params={
|
||||
'start_date': str(start_date),
|
||||
'end_date': str(end_date),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
performance_dashboard_api_client = PerformanceDashboardAPIClient()
|
||||
|
||||
Reference in New Issue
Block a user