Fix single file deletion frontend to parse JSON response properly

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-07 17:53:12 +00:00
parent 082d447e72
commit 77678f6368
2 changed files with 44 additions and 1 deletions
+6 -1
View File
@@ -501,8 +501,13 @@
})
.then(response => {
if (!response.ok) {
throw new Error('Failed to delete file');
return response.json().then(err => {
throw new Error(err.detail || 'Failed to delete file');
});
}
return response.json();
})
.then(data => {
// Reload the page to show updated file list
window.location.reload();
})