diff --git a/src/routes/settings/backups/DestinationModal.svelte b/src/routes/settings/backups/DestinationModal.svelte index 244969a..6b7c803 100644 --- a/src/routes/settings/backups/DestinationModal.svelte +++ b/src/routes/settings/backups/DestinationModal.svelte @@ -57,7 +57,8 @@ loadingStats = true; try { const res = await fetch(`/api/backup/destinations/${destination.id}/task`, { - method: 'POST', headers: { 'Content-Type': 'application/json' }, + // Accept: json runs the read synchronously so we get {success, stats}, not {jobId}. + method: 'POST', headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, body: JSON.stringify({ task: 'stats' }) }); const data = await res.json();