mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
Disabled the template_history endpoint
- Updated tests and added a new mock_get_monthly_template_usage - Deleted get_monthly_template_statistics_for_service - Added new test to test the redirection of the old endpoint
This commit is contained in:
@@ -81,7 +81,7 @@ def template_history(service_id):
|
||||
|
||||
@main.route("/services/<service_id>/template-usage")
|
||||
@login_required
|
||||
@user_has_permissions(admin_override=True)
|
||||
@user_has_permissions('view_activity', admin_override=True)
|
||||
def template_usage(service_id):
|
||||
|
||||
year, current_financial_year = requested_and_current_financial_year(request)
|
||||
|
||||
@@ -20,12 +20,6 @@ class TemplateStatisticsApiClient(NotifyAdminAPIClient):
|
||||
params=params
|
||||
)['data']
|
||||
|
||||
def get_monthly_template_statistics_for_service(self, service_id, year):
|
||||
|
||||
return self.get(
|
||||
url='/service/{}/notifications/templates/monthly?year={}'.format(service_id, year)
|
||||
)['data']
|
||||
|
||||
def get_monthly_template_usage_for_service(self, service_id, year):
|
||||
|
||||
return self.get(
|
||||
|
||||
Reference in New Issue
Block a user