Skip to content

Commit d4a7975

Browse files
committed
feat: /project 返回所有项目,但按照 type_id 进行排序
1 parent aa978ec commit d4a7975

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/project/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ async def query_project(type_id: str = "GameTools"):
4343
],
4444
"download": p.download,
4545
}
46-
for p in project_cache[0]
47-
if p.type_id == type_id
46+
for p in sorted(project_cache[0], key=lambda p: p.type_id != type_id)
4847
]
4948

5049
return {"ec": 200, "data": data}

0 commit comments

Comments
 (0)