mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Post endpoint to create notificaition and get endpoint
to retrieve notification by id return data in shape more consistent with other api endpoints.
This commit is contained in:
@@ -215,7 +215,7 @@ def process_firetext_response():
|
||||
@notifications.route('/notifications/<uuid:notification_id>', methods=['GET'])
|
||||
def get_notifications(notification_id):
|
||||
notification = notifications_dao.get_notification(api_user['client'], notification_id)
|
||||
return jsonify({'notification': notification_status_schema.dump(notification).data}), 200
|
||||
return jsonify(data={"notification": notification_status_schema.dump(notification).data}), 200
|
||||
|
||||
|
||||
@notifications.route('/notifications', methods=['GET'])
|
||||
@@ -380,4 +380,5 @@ def send_notification(notification_type):
|
||||
encryption.encrypt(notification),
|
||||
datetime.utcnow().strftime(DATETIME_FORMAT)
|
||||
), queue='email')
|
||||
return jsonify({'notification_id': notification_id}), 201
|
||||
|
||||
return jsonify(data={"notification": {"id": notification_id}}), 201
|
||||
|
||||
Reference in New Issue
Block a user