This commit is contained in:
Tracker-Friendly 2024-02-25 19:21:26 +00:00
parent f6a28d0ace
commit f3ac1aab10
2 changed files with 4 additions and 4 deletions

2
main
View File

@ -205,7 +205,7 @@ async def apilogin():
"key": randomCharacters,
}, 200
if str(passwordchange) == "1":
if str(passwordchange) == "yes":
hashedpassword = generate_password_hash(newpass)
conn = get_db_connection()
conn.execute("UPDATE users SET password = ? WHERE username = ?", (hashedpassword, username))

View File

@ -111,8 +111,8 @@ signupButton.addEventListener("click", (event) => {
body: JSON.stringify({
username: username,
password: await hashpass(password),
passwordchange: "0",
newpass: 0
passwordchange: "no",
newpass: "null"
}),
headers: {
"Content-type": "application/json; charset=UTF-8"
@ -135,7 +135,7 @@ signupButton.addEventListener("click", (event) => {
body: JSON.stringify({
username: username,
password: await hashpassold(password),
passwordchange: "1",
passwordchange: "yes",
newpass: await hashpass(password)
}),
headers: {