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

pull/180/head
SoulGateKey 2024-10-11 16:16:40 +00:00
parent a673d9dabd
commit 598e4aad76
1 changed files with 5 additions and 2 deletions

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: