diff options
| author | altaf-creator <dev@altafcreator.com> | 2025-12-02 16:59:54 +0700 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2025-12-02 16:59:54 +0700 |
| commit | b6ea44e01c181eab4727880fe3abb6968d277e3c (patch) | |
| tree | dab4d1288456cf891c8b77451d913734e12ddfe3 /backend | |
| parent | 317a9b6fe6dc37a9cbc7aade8e945db497f0257c (diff) | |
why are cookies strs?
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/main.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/main.py b/backend/main.py index 1eee95f..22556d1 100644 --- a/backend/main.py +++ b/backend/main.py @@ -320,7 +320,8 @@ def check_status(response: fastapi.Response, session_key: Annotated[str | None, @app.post("/status") def get_machine_status(response: fastapi.Response, auth_block: Annotated[str | None, fastapi.Cookie()] = None): if auth_block: - return [machine_status[auth_block], machine_times[auth_block], machine_durations[auth_block]] + block = int(auth_block) + return [machine_status[block], machine_times[block], machine_durations[block]] else: response.status_code = fastapi.status.HTTP_401_UNAUTHORIZED return "block cookie needed. unauthorised" |
