From d8b6f6e7a396208210cc6e7cc262d1c65c0dbd7a Mon Sep 17 00:00:00 2001 From: William Mantly Date: Sat, 25 Jul 2026 23:15:07 -0400 Subject: [PATCH] app.api.delete: accept the (url, data, callback) form formAJAX uses formAJAX always passes the serialized form as the second argument, so a DELETE-method form (proxy's host/DNS rows) landed its callback in the data slot and never ran. Co-Authored-By: Claude Opus 5 --- nodejs/public/lib/js/app-base.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nodejs/public/lib/js/app-base.js b/nodejs/public/lib/js/app-base.js index 2b323a3..d5fff48 100644 --- a/nodejs/public/lib/js/app-base.js +++ b/nodejs/public/lib/js/app-base.js @@ -129,7 +129,14 @@ app.api = (function(app){ return body('PUT', url, data, callback); } - function remove(url, callback){ + // Called both as (url, callback) and — from formAJAX, which always passes + // the serialized form as the second argument — as (url, data, callback). + // No request body is sent either way. + function remove(url, data, callback){ + if(typeof data === 'function'){ + callback = data; + data = undefined; + } if(typeof callback !== 'function'){ return new Promise(function(resolve, reject){ $.ajax({