mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Notification_type is a required parameter, admin app always passes it in.
Normalise for notificaiton type. Throw InvalidRequest exception is the notification type is invalid.
This commit is contained in:
committed by
Chris Hill-Scott
parent
5f25fc0db4
commit
e3a75d1b7d
@@ -385,7 +385,12 @@ def get_notification_for_service(service_id, notification_id):
|
||||
|
||||
|
||||
def search_for_notification_by_to_field(service_id, search_term, statuses, notification_type):
|
||||
results = notifications_dao.dao_get_notifications_by_to_field(service_id, search_term, statuses, notification_type)
|
||||
results = notifications_dao.dao_get_notifications_by_to_field(
|
||||
service_id=service_id,
|
||||
search_term=search_term,
|
||||
statuses=statuses,
|
||||
notification_type=notification_type
|
||||
)
|
||||
return jsonify(
|
||||
notifications=notification_with_template_schema.dump(results, many=True).data
|
||||
), 200
|
||||
|
||||
Reference in New Issue
Block a user