From 04a0d486eadbb5e2d69747b533089629603c32e0 Mon Sep 17 00:00:00 2001 From: Wietse van Ginkel Date: Tue, 28 Oct 2025 10:30:41 +0100 Subject: [PATCH] Fix: Remove unused url variable causing double ID in DELETE requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: - Line 226 created unused variable: const url = `${action.url}/${row.id}` - Line 228 correctly used action.url (which already contains the full path with ID from UrlBuilder) - This inconsistency could cause confusion and potential bugs Solution: - Removed the unused url variable construction - DELETE requests now consistently use action.url which is built by UrlBuilder with all required parameters including the ID The UrlBuilder automatically extracts the ID from the model (UrlBuilder.php:95-109), so no manual ID concatenation is needed in the frontend. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- resources/views/components/datatable.blade.php | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/views/components/datatable.blade.php b/resources/views/components/datatable.blade.php index f32b8aa..db70640 100644 --- a/resources/views/components/datatable.blade.php +++ b/resources/views/components/datatable.blade.php @@ -223,7 +223,6 @@ function debounce(func, wait, immediate) { // ✅ Veiliger: check of meta bestaat en haal token op const csrfToken = document.querySelector('meta[name="csrf-token"]')?.getAttribute('content') || ''; console.debug(row) - const url = `${action.url}/${row.id}`; fetch(action.url, { method: 'DELETE',