mirror of
https://gitea.tendokyu.moe/Hay1tsme/artemis.git
synced 2026-02-15 04:07:29 +08:00
standardization KaleidxScope variable names
This commit is contained in:
@@ -4,7 +4,6 @@ from core.config import CoreConfig
|
||||
from titles.mai2.buddiesplus import Mai2BuddiesPlus
|
||||
from titles.mai2.const import Mai2Constants
|
||||
from titles.mai2.config import Mai2Config
|
||||
from titles.mai2.schema.score import kaleidx_scope
|
||||
|
||||
|
||||
class Mai2Prism(Mai2BuddiesPlus):
|
||||
@@ -50,18 +49,18 @@ class Mai2Prism(Mai2BuddiesPlus):
|
||||
}
|
||||
|
||||
async def handle_get_user_kaleidx_scope_api_request(self, data: Dict) -> Dict:
|
||||
kaleidx_scope = await self.data.score.get_user_kaleidx_scope_list(data["userId"])
|
||||
kaleidxscope = await self.data.score.get_user_kaleidxscope_list(data["userId"])
|
||||
|
||||
if kaleidx_scope is None:
|
||||
if kaleidxscope is None:
|
||||
return {"userId": data["userId"], "userKaleidxScopeList":[]}
|
||||
|
||||
kaleidx_scope_list = []
|
||||
for kaleidx_scope_data in kaleidx_scope:
|
||||
tmp = kaleidx_scope_data._asdict()
|
||||
kaleidxscope_list = []
|
||||
for kaleidxscope_data in kaleidxscope:
|
||||
tmp = kaleidxscope_data._asdict()
|
||||
tmp.pop("user")
|
||||
tmp.pop("id")
|
||||
kaleidx_scope_list.append(tmp)
|
||||
kaleidxscope_list.append(tmp)
|
||||
return {
|
||||
"userId": data["userId"],
|
||||
"userKaleidxScopeList": kaleidx_scope_list
|
||||
"userKaleidxScopeList": kaleidxscope_list
|
||||
}
|
||||
Reference in New Issue
Block a user