feat: fix MFA integration — migration, otplib compat, branding, and add MFA translations for all languages

This commit is contained in:
Maurice
2026-03-29 13:18:53 +02:00
parent 530f233b7d
commit 3abcc0ec76
8 changed files with 153 additions and 6 deletions

View File

@@ -194,8 +194,6 @@ function runMigrations(db: Database.Database): void {
try { db.exec('ALTER TABLE reservations ADD COLUMN reservation_end_time TEXT'); } catch {}
},
() => {
try { db.exec('ALTER TABLE users ADD COLUMN mfa_enabled INTEGER DEFAULT 0'); } catch {}
try { db.exec('ALTER TABLE users ADD COLUMN mfa_secret TEXT'); } catch {}
try { db.exec('ALTER TABLE places ADD COLUMN osm_id TEXT'); } catch {}
},
() => {
@@ -218,6 +216,10 @@ function runMigrations(db: Database.Database): void {
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
)`);
},
() => {
try { db.exec('ALTER TABLE users ADD COLUMN mfa_enabled INTEGER DEFAULT 0'); } catch {}
try { db.exec('ALTER TABLE users ADD COLUMN mfa_secret TEXT'); } catch {}
},
];
if (currentVersion < migrations.length) {