migration: preserve review journal alerts and assistant slice

This commit is contained in:
leefer
2026-07-31 11:55:27 +08:00
parent 11eebbf6cb
commit 26e67b3a92
13 changed files with 1077 additions and 767 deletions
+16
View File
@@ -0,0 +1,16 @@
from __future__ import annotations
import json
from http import HTTPStatus
class AlertHttpMixin:
def save_alert(self) -> None:
try:
body = self.read_json_body()
self.send_json(
{"ok": True, **self.application_service.create_alert(body)},
HTTPStatus.CREATED,
)
except (ValueError, json.JSONDecodeError) as exc:
self.send_json({"error": str(exc)}, HTTPStatus.BAD_REQUEST)