feat 支持Emby/Jellyfin登录认证

This commit is contained in:
jxxghp
2023-06-20 13:09:11 +08:00
parent 47f5942e22
commit 0776a0b235
17 changed files with 117 additions and 87 deletions

View File

@ -4,11 +4,10 @@ from fastapi import APIRouter, Depends
from sqlalchemy.orm import Session
from app import schemas
from app.core.security import verify_token
from app.db import get_db
from app.db.models.downloadhistory import DownloadHistory
from app.db.models.transferhistory import TransferHistory
from app.db.models.user import User
from app.db.userauth import get_current_active_user
router = APIRouter()
@ -17,7 +16,7 @@ router = APIRouter()
async def download_history(page: int = 1,
count: int = 30,
db: Session = Depends(get_db),
_: User = Depends(get_current_active_user)) -> Any:
_: schemas.TokenPayload = Depends(verify_token)) -> Any:
"""
查询下载历史记录
"""
@ -29,7 +28,7 @@ async def transfer_history(title: str = None,
page: int = 1,
count: int = 30,
db: Session = Depends(get_db),
_: User = Depends(get_current_active_user)) -> Any:
_: schemas.TokenPayload = Depends(verify_token)) -> Any:
"""
查询转移历史记录
"""