Ensure plugins api provides a filtered view

This commit is contained in:
Nick O'Leary
2024-03-21 16:37:05 +00:00
parent 3df3096bb4
commit fef93818c9
3 changed files with 102 additions and 67 deletions

View File

@@ -65,7 +65,12 @@ function filterNodeInfo(n) {
r.err = n.err;
}
if (n.hasOwnProperty("plugins")) {
r.plugins = n.plugins;
r.plugins = n.plugins.map(p => {
return {
id: p.id,
type: p.type
}
});
}
if (n.type === "plugin") {
r.editor = !!n.template;