Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Kata Martin <katasm@gmail.com>
  • Loading branch information
andersy005 and katamartin authored Jan 24, 2025
1 parent 033914f commit ae75781
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions offsets_db_api/routers/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
@cache(namespace=CACHE_NAMESPACE)
async def get_project_types(
request: Request,
top_n: int = Query(6, description='Number of top project types to return'),
top_n: int = Query(5, description='Number of top project types to return'),
session: Session = Depends(get_session),
authorized_user: bool = Depends(check_api_key),
):
Expand All @@ -48,7 +48,7 @@ async def get_project_types(
result = session.exec(statement).all()
top = [project_type for project_type, _ in result[:top_n]]
others = [project_type for project_type, _ in result[top_n:]]
return ProjectTypes(top=top, others=others)
return ProjectTypes(Top=top, Other=others)


@router.get(
Expand Down

0 comments on commit ae75781

Please sign in to comment.