fix: add 1.5s delay between delete and recreate to avoid SQLITE_BUSY

This commit is contained in:
Claus Lohmar 2026-07-11 23:04:11 +01:00
parent 6cf084b931
commit 48cda41d69

View file

@ -1616,6 +1616,9 @@ const adminHTML = `<!DOCTYPE html>
const delResp = await fetch('/api/users/' + username, { method: 'DELETE' });
if (!delResp.ok) { alert('Failed to delete user for re-creation'); return; }
// Wait for SQLite to release the lock before recreating
await new Promise(r => setTimeout(r, 1500));
// 2. Recreate with new data
const body = JSON.stringify({
users: [{