diff --git a/api/function/controllers/function.js b/api/function/controllers/function.js index 481d237..9785852 100644 --- a/api/function/controllers/function.js +++ b/api/function/controllers/function.js @@ -32,8 +32,14 @@ module.exports = { ); }); }; - let output = await script(); - return output; + + let result = await script(); + let message = {}; + entity.output.forEach((out, index) => { + message[out.name] = result[index]; + }); + + return message; } return entity;