Files
notifications-admin/app/main/views/history.py
Chris Hill-Scott fce0397b55 Move service history into it own file
We’re going to do some work on this page, let’s put it in a sensible
place first before we add a bunch more code to the wrong place.
2019-10-21 16:29:05 +01:00

20 lines
507 B
Python

from flask import render_template
from app import service_api_client
from app.main import main
from app.utils import user_has_permissions
@main.route("/services/<service_id>/history")
@user_has_permissions('manage_service')
def history(service_id):
data = service_api_client.get_service_history(service_id)['data']
return render_template(
'views/temp-history.html',
services=data['service_history'],
api_keys=data['api_key_history'],
events=data['events']
)