diff --git a/app/routers/videos.py b/app/routers/videos.py index 514be2d..d18dc66 100644 --- a/app/routers/videos.py +++ b/app/routers/videos.py @@ -97,7 +97,9 @@ async def get_random_unvoted_video(current_user: dict = Depends(is_user)): if not unvoted_videos: raise HTTPException(status_code=404, detail="No more videos to vote on!") - return Video(**unvoted_videos) + random_video = random.choice(unvoted_videos) + + return Video(**random_video) @router.post("/{video_id}/vote", status_code=status.HTTP_201_CREATED)