initial commit for GitHub

This commit is contained in:
Lucas Jensen
2024-12-01 19:15:25 -08:00
commit 925b334e4c
91 changed files with 8031 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
from fastapi import APIRouter
from app.controller import controller
from app.model import Video
router = APIRouter(
prefix="/videos",
tags=["videos"],
responses={404: {"description": "Not found"}},
)
@router.get("/")
async def all_videos() -> list[Video]:
return await controller.get_all_videos()
@router.get("/{video_id}")
async def video(video_id: int) -> Video:
return controller.get_one_video(video_id)