Skip to content

Commit 93d19eb

Browse files
committed
Update API v0 project list ordering
1 parent 69cc153 commit 93d19eb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

backend/apps/api/rest/v0/project.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,14 @@ def list_projects(
7171
ordering: Literal["created_at", "-created_at", "updated_at", "-updated_at"] | None = Query(
7272
None,
7373
description="Ordering field",
74-
example="-created_at",
7574
),
7675
) -> list[Project]:
7776
"""Get projects."""
78-
return filters.filter(ProjectModel.active_projects.order_by(ordering or "-created_at"))
77+
return filters.filter(
78+
ProjectModel.active_projects.order_by(
79+
ordering or "-level_raw", "-stars_count", "-forks_count"
80+
)
81+
)
7982

8083

8184
@router.get(

0 commit comments

Comments
 (0)