enable CW by default

This commit is contained in:
Lynne Megido 2018-11-14 00:37:59 +10:00
parent c0119bb38c
commit e556574261
Signed by: lynnesbian
GPG key ID: FB7B970303ACE499

4
web.py
View file

@ -16,7 +16,7 @@ import bcrypt
cfg = json.load(open("meta.json"))
scopes = ["read:accounts", "write:statuses"]
settings = {
"cw": False,
"cw": True,
# "disabled": False,
}
@ -38,7 +38,7 @@ dc = db.cursor(dictionary=True)
# | latest_post | tinytext | YES | | NULL | |
# | last_check | int(11) | NO | | 0 | |
# | time_between_checks | int(11) | NO | | 1 | |
# | settings | varchar(4096) | YES | | {"cw": false} | |
# | settings | varchar(4096) | YES | | {"cw": true} | |
# +---------------------+---------------+------+-----+------------------------------------------------+-------+
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),))