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
+22
View File
@@ -0,0 +1,22 @@
from __future__ import annotations
class AccountRoutesMixin:
def _handle_accounts_public_get(self, parsed) -> bool:
if parsed.path == "/api/auth/me":
self.auth_me()
return True
return False
def _handle_accounts_get(self, parsed) -> bool:
if parsed.path == "/api/account/status":
self.send_json({"ok": True, **self.application_service.status()})
return True
return False
def _handle_accounts_delete(self, parsed) -> bool:
if parsed.path == "/api/account/birth-profile":
deleted = self.application_service.database.delete_user_birth_profile(self.application_service.current_user_id)
self.send_json({"ok": True, "deleted": deleted})
return True
return False