Skip to content

Commit

Permalink
update methods for applicability
Browse files Browse the repository at this point in the history
  • Loading branch information
anjanaw committed Feb 7, 2024
1 parent d9940e8 commit aa5667f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/controllers/trees.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,17 @@ module.exports.methods = async (req, res) => {
"explain": 'true'
}
};
console.log("before applicabilities");
const applicabilities = await axios(config);
console.log("applicabilities", applicabilities);
const appResponse = await axios(config);
console.log("applicabilities", appResponse.data);
const data = await Tree.findById(requestData.treeId);
if (data) {
let methods = []
let apps = {}
data.data.trees.forEach(t => {
for (var n in t.nodes) {
if (t.nodes[n].Concept == "Explanation Method") {
methods.push(t.nodes[n].Instance)
apps[t.nodes[n].Instance] = applicabilities[t.nodes[n].Instance];
methods.push(t.nodes[n].Instance);
apps[t.nodes[n].Instance] = appResponse.data[t.nodes[n].Instance];
}
}
});
Expand Down

0 comments on commit aa5667f

Please sign in to comment.