Update: Refactor to absolute imports, fix QPS limits, and enhance Gitea sync with SQLite support
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
from fastapi import Depends, HTTPException, status, Query, Request
|
||||
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
|
||||
|
||||
from .jwt_handler import decode_token
|
||||
from web.backend.auth.jwt_handler import decode_token
|
||||
|
||||
security = HTTPBearer()
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ from typing import Optional
|
||||
|
||||
from jose import jwt, JWTError
|
||||
|
||||
from ..config import get_or_generate_secret, JWT_ALGORITHM, JWT_EXPIRE_HOURS
|
||||
from web.backend.config import get_or_generate_secret, JWT_ALGORITHM, JWT_EXPIRE_HOURS
|
||||
|
||||
|
||||
def create_access_token(data: dict, expires_delta: Optional[timedelta] = None) -> str:
|
||||
|
||||
@@ -5,8 +5,8 @@ import bcrypt
|
||||
from fastapi import APIRouter, HTTPException, Depends, status
|
||||
from pydantic import BaseModel
|
||||
|
||||
from .jwt_handler import create_access_token
|
||||
from .dependencies import get_current_user
|
||||
from web.backend.auth.jwt_handler import create_access_token
|
||||
from web.backend.auth.dependencies import get_current_user
|
||||
|
||||
router = APIRouter(prefix="/api/auth", tags=["auth"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user