mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
Optionally get notifications created w/ test key
This is only for the method that the admin app uses; it doesn’t affect the public get notifications endpoint.
This commit is contained in:
@@ -422,6 +422,7 @@ class NotificationsFilterSchema(ma.Schema):
|
||||
page_size = fields.Int(required=False)
|
||||
limit_days = fields.Int(required=False)
|
||||
include_jobs = fields.Boolean(required=False)
|
||||
include_from_test_key = fields.Boolean(required=False)
|
||||
|
||||
@pre_load
|
||||
def handle_multidict(self, in_data):
|
||||
|
||||
@@ -214,6 +214,7 @@ def get_all_notifications_for_service(service_id):
|
||||
page_size = data['page_size'] if 'page_size' in data else current_app.config.get('PAGE_SIZE')
|
||||
limit_days = data.get('limit_days')
|
||||
include_jobs = data.get('include_jobs', True)
|
||||
include_from_test_key = data.get('include_from_test_key', False)
|
||||
|
||||
pagination = notifications_dao.get_notifications_for_service(
|
||||
service_id,
|
||||
@@ -221,7 +222,9 @@ def get_all_notifications_for_service(service_id):
|
||||
page=page,
|
||||
page_size=page_size,
|
||||
limit_days=limit_days,
|
||||
include_jobs=include_jobs)
|
||||
include_jobs=include_jobs,
|
||||
include_from_test_key=include_from_test_key
|
||||
)
|
||||
kwargs = request.args.to_dict()
|
||||
kwargs['service_id'] = service_id
|
||||
return jsonify(
|
||||
|
||||
Reference in New Issue
Block a user