From 9cfbf0c7cde1bf1d1ddfa76a1e9f2665478b872c Mon Sep 17 00:00:00 2001 From: arzumify Date: Sun, 25 Feb 2024 19:31:29 +0000 Subject: [PATCH] Finally fixed migration --- main | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/main b/main index 270d7d4..95b0bfa 100644 --- a/main +++ b/main @@ -201,17 +201,18 @@ async def apilogin(): conn.commit() conn.close() - return { - "key": randomCharacters, - }, 200 - - if str(passwordchange) == "yes": + if passwordchange == "yes": hashedpassword = generate_password_hash(newpass) conn = get_db_connection() conn.execute("UPDATE users SET password = ? WHERE username = ?", (hashedpassword, username)) conn.commit() conn.close() + return { + "key": randomCharacters, + }, 200 + + @app.route("/api/userinfo", methods=("GET", "POST")) async def apiuserinfo(): if request.method == "POST":