mirror of
https://github.com/key-networks/ztncui.git
synced 2025-10-01 19:05:04 +02:00
添加错误处理和AJAX更新的状态响应
This commit is contained in:
parent
417fd4902f
commit
b3112f7cb6
1 changed files with 8 additions and 0 deletions
|
@ -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
|
} else { // GET
|
||||||
const basePath = getBasePath(req);
|
const basePath = getBasePath(req);
|
||||||
res.redirect(basePath + "/controller/network/" + req.params.nwid + "#members");
|
res.redirect(basePath + "/controller/network/" + req.params.nwid + "#members");
|
||||||
|
|
Loading…
Add table
Reference in a new issue