Update mai2/schema/score.py to support new handle_get_game_ranking
This commit is contained in:
parent
a673d9dabd
commit
598e4aad76
@ -396,8 +396,11 @@ class Mai2ScoreData(BaseData):
|
|||||||
return result.fetchall()
|
return result.fetchall()
|
||||||
|
|
||||||
async def get_playlogs(self, user_id: int, idx: int = 0, limit: int = 0) -> Optional[List[Row]]:
|
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:
|
if limit:
|
||||||
sql = sql.limit(limit)
|
sql = sql.limit(limit)
|
||||||
if idx:
|
if idx:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user