chore: 基线提交(重构前快照)
重构前保存现有 apps/ 结构基线,供后续各阶段回滚。 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from fastapi import FastAPI, Depends
|
||||
|
||||
from apps.middleware.login_required import login_required
|
||||
from apps.views import login as login_view
|
||||
from routers.v1 import v1
|
||||
|
||||
|
||||
# 注册路由
|
||||
def register_router(app: FastAPI):
|
||||
# 登录和验证码无需认证,直接挂载到 app
|
||||
app.include_router(login_view.router, tags=["系统登录"])
|
||||
|
||||
# 需要认证的路由集合
|
||||
app.include_router(
|
||||
v1,
|
||||
dependencies=[Depends(login_required)],
|
||||
)
|
||||
Reference in New Issue
Block a user