fix bugs for launch: postgresql url for sqlalchemy; auto loading env

This commit is contained in:
2026-05-19 01:39:57 +08:00
parent a83befe109
commit 86b030930c
7 changed files with 71 additions and 7 deletions
+15
View File
@@ -0,0 +1,15 @@
from fastapi import APIRouter
from .deps import get_current_user
from .jwt import create_jwt_token, create_refresh_token, verify_access_token
# 统一创建并导出路由器,满足 main.py 的 include_router 需求
router = APIRouter(tags=["Authentication"])
# 显式声明这个包对外暴露的接口
__all__ = [
"router",
"get_current_user",
"create_jwt_token",
"create_refresh_token",
"verify_access_token",
]
+1 -1
View File
@@ -1,6 +1,6 @@
from fastapi import Request, HTTPException
import app.auth.jwt as jwt
import os
from . import jwt
JWT_SECRET = os.getenv("JWT_SECRET")
JWT_ALGORITHM = os.getenv("JWT_ALGORITHM", "HS256")
+1 -1
View File
@@ -1,6 +1,6 @@
import app.auth.jwt as jwt
from datetime import datetime, timedelta, timezone
import os
import jwt
from fastapi import HTTPException, status
JWT_SECRET = os.getenv("JWT_SECRET")