From 2a29ec0fdcc576759c6d306e5078d7dff4d32fca Mon Sep 17 00:00:00 2001 From: Evan Jarrett Date: Sat, 4 Apr 2026 10:59:06 -0500 Subject: [PATCH] fix htmx deletes --- pkg/appview/src/js/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/appview/src/js/main.js b/pkg/appview/src/js/main.js index 1f6b917..83be2c9 100644 --- a/pkg/appview/src/js/main.js +++ b/pkg/appview/src/js/main.js @@ -3,6 +3,11 @@ import htmx from 'htmx.org'; import 'htmx-ext-json-enc'; window.htmx = htmx; +// htmx 2.x puts DELETE params in the URL by default, which breaks json-enc +// (encodeParameters is never called, leaving an empty request body). Keep +// only GET using URL params so DELETE bodies get JSON-encoded properly. +htmx.config.methodsThatUseUrlParams = ['get']; + // Actor Typeahead (web component, auto-registers on import) import 'actor-typeahead';