新增 消息定时推送功能

This commit is contained in:
liuwei
2025-06-10 12:01:19 +08:00
parent 2f2071394f
commit cd849d2323
2 changed files with 4 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
from flask import Blueprint, render_template, request, redirect, url_for, session, current_app
from functools import wraps
from loguru import logger
# 创建认证蓝图
auth_bp = Blueprint('auth', __name__)
@@ -30,6 +31,7 @@ def login():
if username == server.username and password == server.password:
session['logged_in'] = True
session['username'] = username # 存储用户名到session
logger.debug(f"Login successful. Session after login: {dict(session)}")
return redirect(url_for('main.index'))
else:
error = '用户名或密码错误'