feat(info): 添加获取活动关卡信息功能

This commit is contained in:
2025-08-11 02:11:21 +08:00
parent 91209ad9e2
commit 85cd830046
2 changed files with 166 additions and 31 deletions

View File

@@ -64,3 +64,21 @@ async def get_apps_info() -> InfoOut:
except Exception as e:
return InfoOut(code=500, status="error", message=str(e), data={})
return InfoOut(data=data)
@router.post(
"/get/overview", summary="信息总览", response_model=InfoOut, status_code=200
)
async def add_overview() -> InfoOut:
try:
if_get_maa_stage, data = await Config.get_official_activity_stages()
return InfoOut(
status="success" if if_get_maa_stage else "warning",
message="获取活动关卡信息成功" if if_get_maa_stage else "未能获取活动关卡信息",
data=data,
)
except Exception as e:
return InfoOut(code=500, status="error", message=str(e), data={})