AniX/backend/modules/pages/search.py
Kentai Radiquum ed21441f9f
Changelog:
Backend:
- ADD Search API
- EXTEND Release API
2024-04-18 23:00:04 +05:00

14 lines
410 B
Python

import json
from fastapi import APIRouter
from fastapi import Request
from modules.proxy import apiRequest
from modules.proxy import ENDPOINTS
router = APIRouter()
@router.post("", summary="Search for a release")
async def Search(request: Request, query: str, page: int = 0):
data = json.dumps({"query": query, "searchBy": 0})
return await apiRequest(request, ENDPOINTS["search"], page, data=data)