mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 07:21:13 -05:00
Update the new endpoint to return a 404 if the job or service id are not found.
All our endpoint should perform a check that the params are valid - this is an easy whay to check that and is standard for our endpoints. I reverted the query to just filter by job id.
This commit is contained in:
@@ -110,7 +110,8 @@ def get_all_notifications_for_service_job(service_id, job_id):
|
||||
|
||||
@job_blueprint.route('/<job_id>/notification_count', methods=['GET'])
|
||||
def get_notification_count_for_job_id(service_id, job_id):
|
||||
count = dao_get_notification_count_for_job_id(service_id=service_id, job_id=job_id)
|
||||
dao_get_job_by_service_id_and_job_id(service_id, job_id)
|
||||
count = dao_get_notification_count_for_job_id(job_id=job_id)
|
||||
return jsonify(
|
||||
count=count
|
||||
), 200
|
||||
|
||||
Reference in New Issue
Block a user