13 lines
350 B
Python
13 lines
350 B
Python
from fastapi import APIRouter
|
|
from app.services import YouTubeService
|
|
from app.schemas import DownloadResponse
|
|
from app.schemas import DownloadRequest
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.post("/", response_model=DownloadResponse)
|
|
async def download_video(data: DownloadRequest):
|
|
response_data = YouTubeService.download(data)
|
|
return response_data
|