From cd49080c6378105b513171374850f0f4da7f7e27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6pf?= Date: Sun, 15 Jan 2023 16:28:46 +0100 Subject: [PATCH] add response_model param to leaderboards endpoint --- backend/oasst_backend/api/v1/leaderboards.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/oasst_backend/api/v1/leaderboards.py b/backend/oasst_backend/api/v1/leaderboards.py index 0a6e5660..6341df36 100644 --- a/backend/oasst_backend/api/v1/leaderboards.py +++ b/backend/oasst_backend/api/v1/leaderboards.py @@ -10,8 +10,8 @@ from sqlmodel import Session router = APIRouter() -@router.get("/{time_frame}") -def get_leaderboard_day( +@router.get("/{time_frame}", response_model=LeaderboardStats) +def get_leaderboard( time_frame: UserStatsTimeFrame, max_count: Optional[int] = Query(100, gt=0, le=10000), api_client: ApiClient = Depends(deps.get_api_client),