Commit 85953f09 authored by Nilanjan Daw's avatar Nilanjan Daw

Dynamic explicit chain support added

parent 2b63e16f
......@@ -188,19 +188,31 @@ router.post('/execute/:id', (req, res) => {
// if (req.body.map)
// map = req.body.map
// else {
readMap(`./repository/map${req.params.id}.json`)
.then(data => {
map = data
if (req.files && req.files.map) {
map = JSON.parse(req.files.map.data.toString());
readMap(`./repository/aliases${req.params.id}.json`)
.then(data => {
aliases = data
let payload = JSON.parse(req.body.data)
console.log(payload);
orchestrator(res, payload, map, aliases, [])
})
})
// }
.then(data => {
aliases = data
let payload = JSON.parse(req.body.data)
console.log(payload);
orchestrator(res, payload, map, aliases, [])
})
} else {
readMap(`./repository/map${req.params.id}.json`)
.then(data => {
map = data
readMap(`./repository/aliases${req.params.id}.json`)
.then(data => {
aliases = data
let payload = JSON.parse(req.body.data)
console.log(payload);
orchestrator(res, payload, map, aliases, [])
})
})
}
})
function orchestrator(res, payload, map, aliases, result) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment