fix(auth): 在请求上下文中添加会话ID设置

feat(gencode): 改进导入验证错误信息格式

fix(scheduler): 修复任务重复添加问题并合并错过的任务

refactor(router): 优化路由转换逻辑避免Layout嵌套

feat(middleware): 增强会话ID提取功能并改进日志记录
This commit is contained in:
zhangtao
2025-12-05 00:19:44 +08:00
parent 7cbcbf73f8
commit b2e0a3d9c4
6 changed files with 99 additions and 14 deletions
@@ -131,7 +131,7 @@ class LoginService:
login_location = await IpLocalUtil.get_ip_location(request_ip)
request.scope["login_location"] = login_location
# 确保在请求上下文中设置用户名
# 确保在请求上下文中设置用户名和会话ID
request.scope["user_username"] = user.username
access_expires = timedelta(minutes=settings.ACCESS_TOKEN_EXPIRE_MINUTES)