From a7189dacbb2c5b34590761ea41ab5c35f3c33b44 Mon Sep 17 00:00:00 2001 From: azazzze1 Date: Thu, 12 Dec 2024 01:46:30 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=BD=D0=B5=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=D1=8C=D0=BD=D0=B0=D1=8F=20=D0=BE=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=BE=D1=82=D0=BA=D0=B0=20json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/routes.py b/backend/app/routes.py index 8723157..40f0ebc 100644 --- a/backend/app/routes.py +++ b/backend/app/routes.py @@ -88,7 +88,7 @@ def register() -> str: return msg -@app.route('/api/login', methods=['GET', 'POST']) +@app.route('/api/login', methods=['POST']) def login() -> str: ''' Функция отвечает за вход пользователя в аккаунт. Совершает поиск по почте и паролю. @@ -115,7 +115,7 @@ def login() -> str: RETURN p ''' - patient : list[Record] = conn.query(query_string, {"mail": request.form['mail'], "password": request.form['password']}) + patient : list[Record] = conn.query(query_string, {"mail": mail, "password": password}) if patient: patient_data : dict = patient[0].data()["p"]