feat 支持Emby/Jellyfin登录认证
This commit is contained in:
@ -4,8 +4,7 @@ from fastapi import APIRouter, Depends
|
||||
|
||||
from app import schemas
|
||||
from app.chain.search import SearchChain
|
||||
from app.db.models.user import User
|
||||
from app.db.userauth import get_current_active_user
|
||||
from app.core.security import verify_token
|
||||
from app.schemas.types import MediaType
|
||||
|
||||
router = APIRouter()
|
||||
@ -14,7 +13,7 @@ router = APIRouter()
|
||||
@router.get("/tmdbid", summary="精确搜索资源", response_model=List[schemas.Context])
|
||||
async def search_by_tmdbid(tmdbid: int,
|
||||
mtype: str = None,
|
||||
_: User = Depends(get_current_active_user)) -> Any:
|
||||
_: schemas.TokenPayload = Depends(verify_token)) -> Any:
|
||||
"""
|
||||
根据TMDBID精确搜索站点资源
|
||||
"""
|
||||
@ -26,7 +25,7 @@ async def search_by_tmdbid(tmdbid: int,
|
||||
|
||||
@router.get("/title", summary="模糊搜索资源", response_model=List[schemas.TorrentInfo])
|
||||
async def search_by_title(title: str,
|
||||
_: User = Depends(get_current_active_user)) -> Any:
|
||||
_: schemas.TokenPayload = Depends(verify_token)) -> Any:
|
||||
"""
|
||||
根据名称模糊搜索站点资源
|
||||
"""
|
||||
|
Reference in New Issue
Block a user