From b3112f7cb6f413c87fe99512e44cd9ad5881b4ec Mon Sep 17 00:00:00 2001 From: piwind Date: Wed, 17 Sep 2025 01:41:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=94=99=E8=AF=AF=E5=A4=84?= =?UTF-8?q?=E7=90=86=E5=92=8CAJAX=E6=9B=B4=E6=96=B0=E7=9A=84=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=93=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/networkController.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/controllers/networkController.js b/src/controllers/networkController.js index 23a9698..3d5b947 100644 --- a/src/controllers/networkController.js +++ b/src/controllers/networkController.js @@ -719,6 +719,14 @@ exports.members = async function(req, res) { } } } + + // Respond based on validation result + if (errors) { + return res.status(400).json({ errors }); + } + + // No content needed for AJAX updates + return res.sendStatus(204); } else { // GET const basePath = getBasePath(req); res.redirect(basePath + "/controller/network/" + req.params.nwid + "#members");