mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-09 05:53:13 -04:00
@@ -230,9 +230,18 @@ def get_service_statistics_for_specific_days(service_id, start, days=1):
|
||||
end_date = datetime.strptime(start, "%Y-%m-%d")
|
||||
start_date = end_date - timedelta(days=days - 1)
|
||||
|
||||
total_notifications, results = dao_fetch_stats_for_service_from_days(service_id, start_date, end_date,)
|
||||
total_notifications, results = dao_fetch_stats_for_service_from_days(
|
||||
service_id,
|
||||
start_date,
|
||||
end_date,
|
||||
)
|
||||
|
||||
stats = get_specific_days_stats(results, start_date, days=days, total_notifications=total_notifications,)
|
||||
stats = get_specific_days_stats(
|
||||
results,
|
||||
start_date,
|
||||
days=days,
|
||||
total_notifications=total_notifications,
|
||||
)
|
||||
|
||||
return stats
|
||||
|
||||
@@ -679,7 +688,9 @@ def get_single_month_notification_stats_for_service(service_id):
|
||||
start_date, end_date = get_month_start_and_end_date_in_utc(month_year)
|
||||
|
||||
# First element is total notifications used elsewhere.
|
||||
__, results = dao_fetch_stats_for_service_from_days(service_id, start_date, end_date)
|
||||
__, results = dao_fetch_stats_for_service_from_days(
|
||||
service_id, start_date, end_date
|
||||
)
|
||||
|
||||
stats = get_specific_days_stats(results, start_date, end_date=end_date)
|
||||
return jsonify(stats)
|
||||
|
||||
Reference in New Issue
Block a user