mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-11-01 02:12:04 +00:00
refactor: move api state to app
This commit is contained in:
1 parent
fa4826fe2d
commit
20ee8a891b
6 files changed
+302
-248
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user