mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-08 19:23:12 -04:00
[WIP] Added dao method and rest endpoint for getting template
statistics by service. Some cosmetic changes to imports. Added fix for job rest not correctly returning errors.
This commit is contained in:
@@ -37,6 +37,8 @@ def get_job_by_service_and_job_id(service_id, job_id):
|
||||
def get_jobs_by_service(service_id):
|
||||
jobs = dao_get_jobs_by_service_id(service_id)
|
||||
data, errors = job_schema.dump(jobs, many=True)
|
||||
if errors:
|
||||
return jsonify(result="error", message=errors), 400
|
||||
return jsonify(data=data)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user