refactor: establish standalone application boundary

This commit is contained in:
leefer
2026-08-03 21:42:25 +08:00
parent 656f28a96d
commit d6def3af15
322 changed files with 73872 additions and 44656 deletions
+18
View File
@@ -0,0 +1,18 @@
from __future__ import annotations
import json
from http import HTTPStatus
class PoolRoutesMixin:
def save_reason(self) -> None:
try:
body = self.read_json_body()
self.application_service.save_reason(
str(body.get("trade_date") or ""),
str(body.get("code") or ""),
str(body.get("reason") or ""),
)
self.send_json({"ok": True})
except (ValueError, json.JSONDecodeError) as exc:
self.send_json({"error": str(exc)}, HTTPStatus.BAD_REQUEST)