summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/main.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/backend/main.py b/backend/main.py
index e529c86..ff6ec38 100644
--- a/backend/main.py
+++ b/backend/main.py
@@ -136,6 +136,10 @@ class Status(Enum):
OUTOFSERVICE = 3,
+class PlaintextPasswordData(BaseModel):
+ password: str
+
+
URI_TO_MACHINES = {
"h1-status": [1, None],
"h1-dryer1": [1, 1],
@@ -475,8 +479,9 @@ def notif_subscribe(data: notif.PushSubscriptionData, response: fastapi.Response
# --- admin login
@app.post("/admin_login", response_class=PlainTextResponse)
-def admin_login(data: str, response: fastapi.Response):
- print(data)
+def admin_login(data: PlaintextPasswordData, response: fastapi.Response):
+ print(data.password)
+ return data.password
# --- override each machine status