refactor: move api state to app

This commit is contained in:
thePR0M3TH3AN committed 2025-08-05 19:14:11 -04:00
1 parent fa4826fe2d
commit 20ee8a891b
6 files changed
+302 -248

No files matched your search

+1 -1
View File
@@ -25,7 +25,7 @@ def api_stop(ctx: typer.Context, host: str = "127.0.0.1", port: int = 8000) -> N
try:
requests.post(
f"http://{host}:{port}/api/v1/shutdown",
headers={"Authorization": f"Bearer {api_module._token}"},
headers={"Authorization": f"Bearer {api_module.app.state.token_hash}"},
timeout=2,
)
except Exception as exc: # pragma: no cover - best effort