diff options
| -rw-r--r-- | backend/main.py | 2 | ||||
| -rw-r--r-- | frontend/main.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/backend/main.py b/backend/main.py index 20078d3..95a61dd 100644 --- a/backend/main.py +++ b/backend/main.py @@ -388,7 +388,7 @@ def finish_laundry(data: FinishRequestData, response: fastapi.Response, session_ def uri_to_information(data: InformationRequestData, response: fastapi.Response, auth_block: Annotated[str | None, fastapi.Cookie()] = None): info = None try: - if data.machine_id: + if len(data.machine_id) > 0: info = URI_TO_MACHINES[data.machine_id] except KeyError: response.status_code = fastapi.status.HTTP_404_NOT_FOUND diff --git a/frontend/main.js b/frontend/main.js index 0e084ab..b7ba1b7 100644 --- a/frontend/main.js +++ b/frontend/main.js @@ -74,7 +74,7 @@ async function information(urlParam = null) { headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ "machine_id": urlParam ? urlParam : null }), + body: JSON.stringify({ "machine_id": urlParam ? urlParam : "" }), }); const block = await response.json()["block"]; |
