diff --git a/src/tinyweb/db.py b/src/tinyweb/db.py index 9c138a1..174bc7c 100644 --- a/src/tinyweb/db.py +++ b/src/tinyweb/db.py @@ -142,7 +142,7 @@ def _ensure_columns(db, table, columns): existing = {r[1] for r in db.execute(f"PRAGMA table_info({table})").fetchall()} for name, col_def in columns.items(): if name not in existing: - db.execute(f"ALTER TABLE {table} ADD COLUMN {col_def}") + db.execute(f"ALTER TABLE {table} ADD COLUMN {name} {col_def}") def init_db(): diff --git a/src/tinyweb/handlers/subscriptions.py b/src/tinyweb/handlers/subscriptions.py index 9528837..393157a 100644 --- a/src/tinyweb/handlers/subscriptions.py +++ b/src/tinyweb/handlers/subscriptions.py @@ -152,6 +152,11 @@ def handle_subscriptions(msg=""): _sync_threads.pop(sub_id, None) _sync_starts.pop(sub_id, None) + edit_script = """""" + cards = "" for s in subs: sub_id = s["id"] @@ -181,13 +186,21 @@ def handle_subscriptions(msg=""): cards += ( f'