mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
Bump Flask and itsdangerous
This bumps Flask to version 2.1.0, which requires some minor changes to the app code and itsdangerous to also be bumped.
This commit is contained in:
@@ -283,48 +283,34 @@ def register_blueprint(application):
|
||||
|
||||
def register_v2_blueprints(application):
|
||||
from app.authentication.auth import requires_auth
|
||||
from app.v2.broadcast.post_broadcast import (
|
||||
v2_broadcast_blueprint as post_broadcast,
|
||||
from app.v2.broadcast.post_broadcast import v2_broadcast_blueprint
|
||||
from app.v2.inbound_sms.get_inbound_sms import v2_inbound_sms_blueprint
|
||||
from app.v2.notifications import ( # noqa
|
||||
get_notifications,
|
||||
post_notifications,
|
||||
v2_notification_blueprint,
|
||||
)
|
||||
from app.v2.inbound_sms.get_inbound_sms import (
|
||||
v2_inbound_sms_blueprint as get_inbound_sms,
|
||||
)
|
||||
from app.v2.notifications.get_notifications import (
|
||||
v2_notification_blueprint as get_notifications,
|
||||
)
|
||||
from app.v2.notifications.post_notifications import (
|
||||
v2_notification_blueprint as post_notifications,
|
||||
)
|
||||
from app.v2.template.get_template import (
|
||||
v2_template_blueprint as get_template,
|
||||
)
|
||||
from app.v2.template.post_template import (
|
||||
v2_template_blueprint as post_template,
|
||||
)
|
||||
from app.v2.templates.get_templates import (
|
||||
v2_templates_blueprint as get_templates,
|
||||
from app.v2.template import ( # noqa
|
||||
get_template,
|
||||
post_template,
|
||||
v2_template_blueprint,
|
||||
)
|
||||
from app.v2.templates.get_templates import v2_templates_blueprint
|
||||
|
||||
post_notifications.before_request(requires_auth)
|
||||
application.register_blueprint(post_notifications)
|
||||
v2_notification_blueprint.before_request(requires_auth)
|
||||
application.register_blueprint(v2_notification_blueprint)
|
||||
|
||||
get_notifications.before_request(requires_auth)
|
||||
application.register_blueprint(get_notifications)
|
||||
v2_templates_blueprint.before_request(requires_auth)
|
||||
application.register_blueprint(v2_templates_blueprint)
|
||||
|
||||
get_templates.before_request(requires_auth)
|
||||
application.register_blueprint(get_templates)
|
||||
v2_template_blueprint.before_request(requires_auth)
|
||||
application.register_blueprint(v2_template_blueprint)
|
||||
|
||||
get_template.before_request(requires_auth)
|
||||
application.register_blueprint(get_template)
|
||||
v2_inbound_sms_blueprint.before_request(requires_auth)
|
||||
application.register_blueprint(v2_inbound_sms_blueprint)
|
||||
|
||||
post_template.before_request(requires_auth)
|
||||
application.register_blueprint(post_template)
|
||||
|
||||
get_inbound_sms.before_request(requires_auth)
|
||||
application.register_blueprint(get_inbound_sms)
|
||||
|
||||
post_broadcast.before_request(requires_auth)
|
||||
application.register_blueprint(post_broadcast)
|
||||
v2_broadcast_blueprint.before_request(requires_auth)
|
||||
application.register_blueprint(v2_broadcast_blueprint)
|
||||
|
||||
|
||||
def init_app(app):
|
||||
|
||||
@@ -55,7 +55,7 @@ def get_pdf_for_notification(notification_id):
|
||||
except Exception:
|
||||
raise PDFNotReadyError()
|
||||
|
||||
return send_file(filename_or_fp=BytesIO(pdf_data), mimetype='application/pdf')
|
||||
return send_file(path_or_file=BytesIO(pdf_data), mimetype='application/pdf')
|
||||
|
||||
|
||||
@v2_notification_blueprint.route("", methods=['GET'])
|
||||
|
||||
Reference in New Issue
Block a user