From acac12c2115a0947398b7b919ed4e011673d0e21 Mon Sep 17 00:00:00 2001 From: zaphkito Date: Sun, 23 Jun 2024 16:17:46 +0800 Subject: [PATCH] chuni: fix GetUserNetBattleRankingInfoApi --- titles/chuni/schema/profile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/titles/chuni/schema/profile.py b/titles/chuni/schema/profile.py index f47b780..a8bbb1a 100644 --- a/titles/chuni/schema/profile.py +++ b/titles/chuni/schema/profile.py @@ -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()