fix: leak of response model.

This commit is contained in:
EstrellaXD
2023-08-13 18:13:25 +08:00
parent 8300461155
commit 6cac596d85
12 changed files with 130 additions and 57 deletions

View File

@@ -3,12 +3,13 @@ from fastapi.responses import StreamingResponse
from module.searcher import SearchTorrent
from module.security.api import get_current_user, UNAUTHORIZED
from module.models import Torrent
router = APIRouter(prefix="/search", tags=["search"])
@router.get("/")
@router.get("/", response_model=list[Torrent])
async def search_torrents(
site: str = "mikan",
keywords: str = Query(None),