i'm tired and want to go to sleep
This commit is contained in:
parent
10041f9790
commit
068306944c
1 changed files with 3 additions and 3 deletions
6
web.py
6
web.py
|
@ -44,9 +44,9 @@ def db_reconnect():
|
||||||
dc = db.cursor(dictionary=True)
|
dc = db.cursor(dictionary=True)
|
||||||
return (db, c, dc)
|
return (db, c, dc)
|
||||||
|
|
||||||
db, c, dc = db_reconnect()
|
gdb, gc, gdc = db_reconnect()
|
||||||
c.execute("CREATE TABLE IF NOT EXISTS `data` (username VARCHAR(64) NOT NULL, instance VARCHAR(128) NOT NULL, password TINYTEXT NOT NULL, avi TEXT NOT NULL, secret TINYTEXT NOT NULL, client_id VARCHAR(128) NOT NULL, client_secret TINYTEXT NOT NULL, cc TINYTEXT, ccavi VARCHAR(128) DEFAULT 'https://lynnesbian.space/res/ceres/cc-smol.png', latest_post TINYTEXT, last_check INT DEFAULT 0 NOT NULL, time_between_checks INT DEFAULT %s NOT NULL, settings VARCHAR(4096) DEFAULT %s, PRIMARY KEY(username, instance))", (cfg['min_time_between_checks'], json.dumps(settings),))
|
gc.execute("CREATE TABLE IF NOT EXISTS `data` (username VARCHAR(64) NOT NULL, instance VARCHAR(128) NOT NULL, password TINYTEXT NOT NULL, avi TEXT NOT NULL, secret TINYTEXT NOT NULL, client_id VARCHAR(128) NOT NULL, client_secret TINYTEXT NOT NULL, cc TINYTEXT, ccavi VARCHAR(128) DEFAULT 'https://lynnesbian.space/res/ceres/cc-smol.png', latest_post TINYTEXT, last_check INT DEFAULT 0 NOT NULL, time_between_checks INT DEFAULT %s NOT NULL, settings VARCHAR(4096) DEFAULT %s, PRIMARY KEY(username, instance))", (cfg['min_time_between_checks'], json.dumps(settings),))
|
||||||
db.close()
|
gdb.close()
|
||||||
|
|
||||||
app = Flask(cfg['name'])
|
app = Flask(cfg['name'])
|
||||||
app.secret_key = cfg['flask_key']
|
app.secret_key = cfg['flask_key']
|
||||||
|
|
Loading…
Reference in a new issue