Silly
This commit is contained in:
parent
f6a28d0ace
commit
f3ac1aab10
2
main
2
main
|
@ -205,7 +205,7 @@ async def apilogin():
|
||||||
"key": randomCharacters,
|
"key": randomCharacters,
|
||||||
}, 200
|
}, 200
|
||||||
|
|
||||||
if str(passwordchange) == "1":
|
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))
|
||||||
|
|
|
@ -111,8 +111,8 @@ signupButton.addEventListener("click", (event) => {
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
username: username,
|
username: username,
|
||||||
password: await hashpass(password),
|
password: await hashpass(password),
|
||||||
passwordchange: "0",
|
passwordchange: "no",
|
||||||
newpass: 0
|
newpass: "null"
|
||||||
}),
|
}),
|
||||||
headers: {
|
headers: {
|
||||||
"Content-type": "application/json; charset=UTF-8"
|
"Content-type": "application/json; charset=UTF-8"
|
||||||
|
@ -135,7 +135,7 @@ signupButton.addEventListener("click", (event) => {
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
username: username,
|
username: username,
|
||||||
password: await hashpassold(password),
|
password: await hashpassold(password),
|
||||||
passwordchange: "1",
|
passwordchange: "yes",
|
||||||
newpass: await hashpass(password)
|
newpass: await hashpass(password)
|
||||||
}),
|
}),
|
||||||
headers: {
|
headers: {
|
||||||
|
|
Loading…
Reference in New Issue