Refactor models and endpoints, add logging, and improve error handling.
This commit is contained in:
+5
-1
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user