Refactor models and endpoints, add logging, and improve error handling.

This commit is contained in:
Esa Kataja
2024-12-01 22:29:00 +02:00
parent cecd9a4458
commit b5e693ab9f
8 changed files with 174 additions and 77 deletions
+5 -1
View File
@@ -18,7 +18,11 @@ async def get_movies():
@router.get("/next", response_model=Movie)
async def get_next_movie_endpoint():
"""Get the next movie to watch"""
"""Get the next movie to watch
Returns:
Movie: The next movie to watch
"""
next_movie = get_next_movie()
if next_movie is None:
return Response(