refactor: route calc through service layer
This commit is contained in:
@@ -0,0 +1 @@
|
||||
"""Application services for backend API orchestration."""
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user