This commit is contained in:
Tracker-Friendly 2024-03-27 19:16:47 +00:00
parent bd74f89eed
commit 9db8138416
1 changed files with 2 additions and 2 deletions

4
main
View File

@ -197,7 +197,7 @@ async def apiauthenticate():
userCookie = get_session(secretKey) userCookie = get_session(secretKey)
user = get_user(userCookie["id"]) user = get_user(userCookie["id"])
conn = get_db_connection() conn = get_db_connection()
secretkey = conn.execute("SELECT secret FROM userdata WHERE appId = ? AND creator = ? LIMIT 1", (str(appId),int(user))) secretkey = conn.execute("SELECT secret FROM userdata WHERE appId = ? AND creator = ? LIMIT 1", (str(appId),int(user["id"])))
if secretkey: if secretkey:
return secretkey return secretkey
else: else:
@ -216,7 +216,7 @@ async def apicreateauth():
conn = get_db_connection() conn = get_db_connection()
conn.execute("INSERT INTO userdata (appId, creator, secret) VALUES (?, ?, ?)", conn.execute("INSERT INTO userdata (appId, creator, secret) VALUES (?, ?, ?)",
(str(appId),int(user),str(secret))) (str(appId),int(user["id"]),str(secret)))
conn.commit() conn.commit()
conn.close() conn.close()