Silly
This commit is contained in:
parent
f6a28d0ace
commit
f3ac1aab10
2
main
2
main
|
@ -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))
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue