1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Filter loaded property from /nodes endpoint

This commit is contained in:
Nick O'Leary 2015-03-26 11:38:51 +00:00
parent 9daeba02b5
commit dd7f4f6752
2 changed files with 5 additions and 7 deletions

View File

@ -84,12 +84,10 @@ var RED = (function() {
m = msg[i];
var id = m.id;
RED.nodes.addNodeSet(m);
if (m.loaded) {
addedTypes = addedTypes.concat(m.types);
$.get('nodes/'+id, function(data) {
$("body").append(data);
});
}
addedTypes = addedTypes.concat(m.types);
$.get('nodes/'+id, function(data) {
$("body").append(data);
});
}
if (addedTypes.length) {
typeList = "<ul><li>"+addedTypes.join("</li><li>")+"</li></ul>";

View File

@ -29,7 +29,7 @@ var settings = require("../settings");
module.exports = {
getAll: function(req,res) {
if (req.get("accept") == "application/json") {
res.json(redNodes.getNodeList());
res.json(redNodes.getNodeList().map(function(n) { delete n.loaded; return n }));
} else {
res.send(redNodes.getNodeConfigs());
}