forked from Hay1tsme/artemis
chuni: fix GetUserNetBattleRankingInfoApi
This commit is contained in:
parent
699337c419
commit
acac12c211
@ -793,9 +793,9 @@ class ChuniProfileData(BaseData):
|
||||
versions = [row[0] for row in versions_raw]
|
||||
return sorted(versions, reverse=True)
|
||||
|
||||
async def put_net_battle(self, user_id: int, net_battle_data: Dict) -> Optional[int]:
|
||||
async def put_net_battle(self, aime_id: int, net_battle_data: Dict) -> Optional[int]:
|
||||
sql = insert(net_battle).values(
|
||||
user=user_id,
|
||||
user=aime_id,
|
||||
isRankUpChallengeFailed=net_battle_data['isRankUpChallengeFailed'],
|
||||
highestBattleRankId=net_battle_data['highestBattleRankId'],
|
||||
battleIconId=net_battle_data['battleIconId'],
|
||||
@ -816,7 +816,7 @@ class ChuniProfileData(BaseData):
|
||||
return result.inserted_primary_key['id']
|
||||
self.logger.error(f"Failed to put net battle data for user {user_id}")
|
||||
|
||||
async def get_net_battle(self, user_id: int) -> Optional[Row]:
|
||||
result = await self.execute(net_battle.select(net_battle.c.user == user_id))
|
||||
async def get_net_battle(self, aime_id: int) -> Optional[Row]:
|
||||
result = await self.execute(net_battle.select(net_battle.c.user == aime_id))
|
||||
if result:
|
||||
return result.fetchone()
|
||||
|
Loading…
Reference in New Issue
Block a user