From 6f654f8ba97a1a4113c329a4c99a94f51de939d6 Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Sat, 2 Mar 2024 18:00:14 -0500 Subject: [PATCH] mai2: remove redundant method (fixes #103) --- titles/mai2/dx.py | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/titles/mai2/dx.py b/titles/mai2/dx.py index f978eeb..fff39f2 100644 --- a/titles/mai2/dx.py +++ b/titles/mai2/dx.py @@ -285,31 +285,6 @@ class Mai2DX(Mai2Base): "userCardList": card_list[start_idx:end_idx], } - async def handle_get_user_charge_api_request(self, data: Dict) -> Dict: - user_charges = await self.data.item.get_charges(data["userId"]) - if user_charges is None: - return {"userId": data["userId"], "length": 0, "userChargeList": []} - - user_charge_list = [] - for charge in user_charges: - tmp = charge._asdict() - tmp.pop("id") - tmp.pop("user") - tmp["purchaseDate"] = datetime.strftime( - tmp["purchaseDate"], Mai2Constants.DATE_TIME_FORMAT - ) - tmp["validDate"] = datetime.strftime( - tmp["validDate"], Mai2Constants.DATE_TIME_FORMAT - ) - - user_charge_list.append(tmp) - - return { - "userId": data["userId"], - "length": len(user_charge_list), - "userChargeList": user_charge_list, - } - async def handle_get_user_item_api_request(self, data: Dict) -> Dict: kind = int(data["nextIndex"] / 10000000000) next_idx = int(data["nextIndex"] % 10000000000)