Finally fixed migration
This commit is contained in:
parent
f3ac1aab10
commit
9cfbf0c7cd
11
main
11
main
|
@ -201,17 +201,18 @@ async def apilogin():
|
||||||
conn.commit()
|
conn.commit()
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
return {
|
if passwordchange == "yes":
|
||||||
"key": randomCharacters,
|
|
||||||
}, 200
|
|
||||||
|
|
||||||
if str(passwordchange) == "yes":
|
|
||||||
hashedpassword = generate_password_hash(newpass)
|
hashedpassword = generate_password_hash(newpass)
|
||||||
conn = get_db_connection()
|
conn = get_db_connection()
|
||||||
conn.execute("UPDATE users SET password = ? WHERE username = ?", (hashedpassword, username))
|
conn.execute("UPDATE users SET password = ? WHERE username = ?", (hashedpassword, username))
|
||||||
conn.commit()
|
conn.commit()
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
|
return {
|
||||||
|
"key": randomCharacters,
|
||||||
|
}, 200
|
||||||
|
|
||||||
|
|
||||||
@app.route("/api/userinfo", methods=("GET", "POST"))
|
@app.route("/api/userinfo", methods=("GET", "POST"))
|
||||||
async def apiuserinfo():
|
async def apiuserinfo():
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
|
|
Loading…
Reference in New Issue