mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 08:51:30 -05:00
Testing out adding a admin authentication requirement per blueprint.
This commit is contained in:
@@ -4,7 +4,6 @@ from datetime import datetime
|
||||
from flask import (
|
||||
jsonify,
|
||||
request,
|
||||
Blueprint,
|
||||
current_app
|
||||
)
|
||||
from sqlalchemy.orm.exc import NoResultFound
|
||||
@@ -42,9 +41,8 @@ from app.dao import notifications_dao
|
||||
from app.dao.provider_statistics_dao import get_fragment_count
|
||||
from app.dao.users_dao import get_user_by_id
|
||||
from app.errors import (
|
||||
register_errors,
|
||||
InvalidRequest
|
||||
)
|
||||
InvalidRequest,
|
||||
register_errors)
|
||||
from app.service import statistics
|
||||
from app.service.utils import get_whitelist_objects
|
||||
from app.schemas import (
|
||||
@@ -57,8 +55,13 @@ from app.schemas import (
|
||||
detailed_service_schema
|
||||
)
|
||||
from app.utils import pagination_links, get_london_midnight_in_utc
|
||||
from flask import Blueprint
|
||||
|
||||
from app.authentication.auth import requires_admin_auth
|
||||
|
||||
service_blueprint = Blueprint('service', __name__)
|
||||
|
||||
service_blueprint.before_request(requires_admin_auth)
|
||||
register_errors(service_blueprint)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user