mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
28 lines
724 B
JavaScript
28 lines
724 B
JavaScript
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);
|
|
});
|
|
}
|
|
}
|