mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
improve rejection message
This commit is contained in:
parent
5633c5224e
commit
ccb3c991a6
@ -13,7 +13,7 @@ module.exports = {
|
||||
scope: diagnosticsOpts.level || "basic"
|
||||
}
|
||||
if(diagnosticsOpts.enabled === false || diagnosticsOpts.enabled === "false") {
|
||||
apiUtil.rejectHandler(req, res, {message: "disabled", status: 403, code: "diagnostics.enabled" })
|
||||
apiUtil.rejectHandler(req, res, {message: "diagnostics are disabled", status: 403, code: "diagnostics.disabled" })
|
||||
} else {
|
||||
runtimeAPI.diagnostics.get(opts)
|
||||
.then(function(result) { res.json(result); })
|
||||
|
Loading…
Reference in New Issue
Block a user