forked from Ailur/burgernotes-server
Merge branch 'main' of ssh://hectabit.org/HectaBit/PageBurger
This commit is contained in:
commit
f78cef790e
11
main
11
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":
|
||||
|
|
Loading…
Reference in New Issue