Skip to content

Commit

Permalink
fix: неправильная обработка json
Browse files Browse the repository at this point in the history
  • Loading branch information
azazzze1 committed Dec 11, 2024
1 parent 48749d2 commit a7189da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
'''
Функция отвечает за вход пользователя в аккаунт. Совершает поиск по почте и паролю.
Expand All @@ -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"]
Expand Down

0 comments on commit a7189da

Please sign in to comment.