mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-30 03:08:56 -04:00
Rename to performance
This is consistent with the old performance platform URLs, which were gov.uk/performance, and others that we have like /pricing and /features
This commit is contained in:
17
app/main/views/performance.py
Normal file
17
app/main/views/performance.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from flask import jsonify
|
||||
|
||||
from app import performance_dashboard_api_client
|
||||
from app.main import main
|
||||
|
||||
|
||||
@main.route("/performance")
|
||||
def performance():
|
||||
api_args = {}
|
||||
|
||||
api_args['start_date'] = (datetime.utcnow() - timedelta(days=90)).date()
|
||||
api_args['end_date'] = datetime.utcnow().date()
|
||||
|
||||
stats = performance_dashboard_api_client.get_performance_dashboard_stats(api_args)
|
||||
return jsonify(stats)
|
||||
Reference in New Issue
Block a user