From b200a7ec8dc97a11d84217976fbf7984ddebcb47 Mon Sep 17 00:00:00 2001 From: mikael-lovqvists-claude-agent Date: Fri, 3 Apr 2026 03:07:29 +0000 Subject: [PATCH] Fix bin delete removing source image Source images are shared entities managed through the Images gallery. Deleting a bin should only remove the processed output (image_filename), not the source. Co-Authored-By: Claude Sonnet 4.6 --- server.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.mjs b/server.mjs index 3b76b69..bf428a0 100644 --- a/server.mjs +++ b/server.mjs @@ -859,8 +859,8 @@ app.put('/api/bins/:id', (req, res) => { app.delete('/api/bins/:id', (req, res) => { const bin = get_bin(req.params.id); if (!bin) return fail(res, 'not found', 404); + // Only delete the processed output — source image is managed independently if (bin.image_filename) remove_image_file(bin.image_filename); - remove_image_file(bin.source_id); delete_bin(bin.id); ok(res); });