fixed migrations
This commit is contained in:
@@ -7,13 +7,6 @@ from utils import log_event, create_notification, get_unread_count
|
||||
|
||||
auth_bp = Blueprint('auth', __name__)
|
||||
|
||||
@auth_bp.context_processor
|
||||
def inject_unread_notifications():
|
||||
if current_user.is_authenticated:
|
||||
unread_count = get_unread_count(current_user.id)
|
||||
return {'unread_notifications': unread_count}
|
||||
return {'unread_notifications': 0}
|
||||
|
||||
def require_password_change(f):
|
||||
@wraps(f)
|
||||
def decorated_function(*args, **kwargs):
|
||||
@@ -24,6 +17,13 @@ def require_password_change(f):
|
||||
return decorated_function
|
||||
|
||||
def init_routes(auth_bp):
|
||||
@auth_bp.context_processor
|
||||
def inject_unread_notifications():
|
||||
if current_user.is_authenticated:
|
||||
unread_count = get_unread_count(current_user.id)
|
||||
return {'unread_notifications': unread_count}
|
||||
return {'unread_notifications': 0}
|
||||
|
||||
@auth_bp.route('/login', methods=['GET', 'POST'])
|
||||
def login():
|
||||
if current_user.is_authenticated:
|
||||
|
||||
Reference in New Issue
Block a user