mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
27
packages/node_modules/@node-red/editor-api/lib/admin/diagnostics.js
vendored
Normal file
27
packages/node_modules/@node-red/editor-api/lib/admin/diagnostics.js
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
var apiUtils = require("@node-red/editor-api/lib/util");
|
||||
/** @type {runtime.RuntimeModule} */var runtimeAPI;
|
||||
|
||||
|
||||
module.exports = {
|
||||
init: function(/** @type {runtime.RuntimeModule} */_runtimeAPI) {
|
||||
runtimeAPI = _runtimeAPI;
|
||||
},
|
||||
getBasicReport: function(req, res) {
|
||||
var opts = {
|
||||
user: req.user,
|
||||
scope: "basic"
|
||||
}
|
||||
runtimeAPI.diagnostics.get(opts).then(function(result) {
|
||||
res.json(result);
|
||||
});
|
||||
},
|
||||
getAdminReport: function(req, res) {
|
||||
var opts = {
|
||||
user: req.user,
|
||||
scope: "admin"
|
||||
}
|
||||
runtimeAPI.diagnostics.get(opts).then(function(result) {
|
||||
res.json(result);
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user