From b5e7d5188a6d2becb4825ae4880ba4c635da0f45 Mon Sep 17 00:00:00 2001 From: Jarek Krochmalski Date: Sun, 13 Sep 2026 14:50:02 +0200 Subject: [PATCH] repository stats no longer fail on the backups screen --- src/routes/settings/backups/DestinationModal.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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();