diff --git a/config.ini b/config.ini.example similarity index 100% rename from config.ini rename to config.ini.example diff --git a/database.db b/database.db deleted file mode 100644 index 485fcea..0000000 Binary files a/database.db and /dev/null differ diff --git a/main b/main index bad8c2c..ba3dfb9 100644 --- a/main +++ b/main @@ -197,7 +197,7 @@ async def apiauthenticate(): userCookie = get_session(secretKey) user = get_user(userCookie["id"]) conn = get_db_connection() - secretkey = conn.execute("SELECT secret FROM userdata WHERE appId = ? AND creator = ? LIMIT 1", (appId,user)) + secretkey = conn.execute("SELECT secret FROM userdata WHERE appId = ? AND creator = ? LIMIT 1", (str(appId),int(user))) if secretkey: return secretkey else: @@ -216,7 +216,7 @@ async def apicreateauth(): conn = get_db_connection() conn.execute("INSERT INTO userdata (appId, creator, secret) VALUES (?, ?, ?)", - (appId,user,secret)) + (str(appId),int(user),str(secret))) conn.commit() conn.close() diff --git a/schema.sql b/schema.sql index 4a12118..7bc759b 100644 --- a/schema.sql +++ b/schema.sql @@ -10,7 +10,7 @@ CREATE TABLE users ( ); CREATE TABLE userdata ( - creator TEXT NOT NULL, + creator INTEGER NOT NULL, appId TEXT NOT NULL, secret TEXT NOT NULL );