mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 14:31:57 -05:00
Create 'v2' get notification route
The new 'v2' API wants to return less data than the previous one, which was sending back tons of fields the clients never used. This new route returns only useful information, with the JSON response dict being built up in the model's `.serialize()` method. Note that writing the test for this was a bit painful because of having to treat loads of keys differently. Hopefully we think this is a good way to write this test, because if we don't, we should start thinking of a better way to check the values are what we expect.
This commit is contained in:
@@ -96,8 +96,11 @@ def register_blueprint(application):
|
||||
|
||||
|
||||
def register_v2_blueprints(application):
|
||||
from app.v2.notifications.post_notifications import notification_blueprint
|
||||
application.register_blueprint(notification_blueprint)
|
||||
from app.v2.notifications.post_notifications import notification_blueprint as post_notifications
|
||||
from app.v2.notifications.get_notifications import notification_blueprint as get_notifications
|
||||
|
||||
application.register_blueprint(post_notifications)
|
||||
application.register_blueprint(get_notifications)
|
||||
|
||||
|
||||
def init_app(app):
|
||||
|
||||
Reference in New Issue
Block a user