refactor: establish standalone application boundary

This commit is contained in:
leefer
2026-08-03 21:42:25 +08:00
parent cc5fb8d73e
commit e1e76cd51e
324 changed files with 63090 additions and 44743 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