1
0
mirror of synced 2025-02-16 10:22:32 +01:00

Update mai2/schema/score.py to support new handle_get_game_ranking

This commit is contained in:
SoulGateKey 2024-10-11 16:16:40 +00:00
parent a673d9dabd
commit 598e4aad76

View File

@ -396,8 +396,11 @@ class Mai2ScoreData(BaseData):
return result.fetchall()
async def get_playlogs(self, user_id: int, idx: int = 0, limit: int = 0) -> Optional[List[Row]]:
sql = playlog.select(playlog.c.user == user_id)
if user_id is not None:
sql = playlog.select(playlog.c.user == user_id)
else:
sql = playlog.select()
if limit:
sql = sql.limit(limit)
if idx: