refactor: route calc through service layer

This commit is contained in:
2026-06-04 19:44:32 +08:00
parent ffa9d1c2bd
commit 234df937a7
4 changed files with 24 additions and 3 deletions
+1
View File
@@ -0,0 +1 @@
"""Application services for backend API orchestration."""
+10
View File
@@ -0,0 +1,10 @@
from typing import Any
from api.core.Auth import AlterState
from core.basic.character import createCharacter
def calculate(state: AlterState, config: dict[str, Any] | None) -> dict[str, Any]:
safe_config = config or {}
character = createCharacter(state.alter, state.equVersion)
return character.calc(safe_config)