From bd74f89eed9734a33c5635d8b6b60445344e263e Mon Sep 17 00:00:00 2001 From: Tracker-Friendly Date: Wed, 27 Mar 2024 19:11:44 +0000 Subject: [PATCH] I am dumb --- config.ini => config.ini.example | 0 database.db | Bin 20480 -> 0 bytes main | 4 ++-- schema.sql | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename config.ini => config.ini.example (100%) delete mode 100644 database.db 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 485fceafa5e54f6efbada889c89ad1d1dec07e11..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20480 zcmeI2%WfUV5r)s9Zm|-D*#un47#LoNutD|xq5!d(gcbx*v?Wt;v@)uzt6(CuDD%)( zJe1Vg3 z3<86|ATS6F0)xOHFbE6+gTNp#2>h1>PCvYIZR6(6<;zb`s2$2mR;z=fr>pbtE5CoV zv%SAF?Qj2XcV{}kI^DWH;duS?pilSq_IK{?Jeodvbnn6TqbJk-ohQ@wDjY;{o>H)hM?og#g^-vpR8To zc<;UClUF3aIz&1A`AWX}TAs43F8;i9VNyS6y!Dj6l=snd^K|plwT+F9;J^ZI0k`1U=SDt27y6f5Eujofk9vp z7z74^LEwLyz%SM=-CUmkC&=2*mX|i(I{W{Fx&B|Sf3U!79D~3hFbE6+gTNp#2n+&) zz#uRP3<86|An@Y^PJg?+y12dZ@}bSv#uTcJTRxZI{1HCb^| zjq$~EP65Bzb4w=3d;tSymyAi)I9DB~!oH;zQ!j-%t8`30GU1tm8Mw@@70TF3%#U~fZ_N*%qb>nuc6 zO*1x#lB-gv6w|FMCApSD?`UW4T-7rbh0{XAt*MYm=p`i2f(KeLCBu`Yhge`;ilv2y z9hWvMJ~K>pxUq|JiRkZ=!#*uZ&xMSS&Iu-xO0E_S6jPW?5=g5Y;7Kz654dsu-ot zfD~A9dyPpV7&&KZVvtINc{$uLZ*i%a*=*+%@Y#%gIL4^hsKfjsIg)a$(UW9jB2k1t zeG>#T420tar-%$>6WPuVF>8B;)r`1twqVW;@G7hVVylQ`TqElPjDSm;L+%AQ4O@96 zmp(Z9_Tcc4ZpSS%-TLg{X+L_tn)dc5Yqrd9rsHq!Sm(FQ=5$y1Pe-?%u?8I2@8N8d6c*nkX@AqWQWA*QD4jX-rPK^zp*4%D-6cz$doHd9ItK8PU+@~8+(EMq}8 zwmF8orIbN7nabKrPs}N3)P!2Bz)Hw(7R|MEu=a7*OjK$C`JIeHB%oZv(IEpB1~{t; z!>LUQ&9VSG>nfHAa`vpmvmVL`B7*9%Bd;YP{!2}zWF$ViAd;kF2?$UbNG%FXixLrn z7NCX@9_6G+Fj()AQ`{{#SOF1FjAcoC%?N^8E%F9A=2~P#oK%2;{6&kd1n)w~3tXO^ zV7!c{AuoN?ZlF$(D9tEa6QuDhIu&|fT?Kg5tI&l2N2LheL_TUqSIq@e=a^#%@C4Sc z*=w0mEvxS(qhLmwDq%H6SQd*F2vX}pCL4Q3fEypOI^Vmuy)kNN1W8mZ99)tLAy%-! zA$Fi)4U0$MT(A&X#97Q5G6bt&6=1C0DBvBzU@Qb!mpm3bn5zh+*bto2=Y(l9Vc z)e4RYeX&qNP7z&YR!sDOCS`9L>i9}k5mivBKBrV@DD@qgY<t~o JwVy&w{sngaQo;ZL 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 );