mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 23:55:58 -05:00
Add events to temporary history view for story sign off.
This commit is contained in:
@@ -186,11 +186,12 @@ def _process_permissions(user, service, permission_groups):
|
||||
# tables. This is so product owner can pass stories as done
|
||||
@service.route('/<uuid:service_id>/history', methods=['GET'])
|
||||
def get_service_history(service_id):
|
||||
from app.models import (Service, ApiKey, Template)
|
||||
from app.models import (Service, ApiKey, Template, Event)
|
||||
from app.schemas import (
|
||||
service_history_schema,
|
||||
api_key_history_schema,
|
||||
template_history_schema
|
||||
template_history_schema,
|
||||
event_schema
|
||||
)
|
||||
|
||||
service_history = Service.get_history_model().query.filter_by(id=service_id).all()
|
||||
@@ -207,9 +208,13 @@ def get_service_history(service_id):
|
||||
template_history = Template.get_history_model().query.filter_by(service_id=service_id).all()
|
||||
template_data, errors = template_history_schema.dump(template_history, many=True)
|
||||
|
||||
events = Event.query.all()
|
||||
events_data, errors = event_schema.dump(events, many=True)
|
||||
|
||||
data = {
|
||||
'service_history': service_data,
|
||||
'api_key_history': api_keys_data,
|
||||
'template_history': template_data}
|
||||
'template_history': template_data,
|
||||
'events': events_data}
|
||||
|
||||
return jsonify(data=data)
|
||||
|
||||
Reference in New Issue
Block a user