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:
parent
9daeba02b5
commit
dd7f4f6752
@ -84,13 +84,11 @@ 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);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (addedTypes.length) {
|
||||
typeList = "<ul><li>"+addedTypes.join("</li><li>")+"</li></ul>";
|
||||
RED.notify("Node"+(addedTypes.length!=1 ? "s":"")+" added to palette:"+typeList,"success");
|
||||
|
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user