Skip to content

Commit a09c828

Browse files
committed
fix for multiple lazy commands handling
1 parent ceda21f commit a09c828

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/handlers/queryHandler.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ function queryHandler(id, type, service, subservice, attributes, callback) {
100100
const lazyAttributes = filterLazy(device, attributes);
101101
const funcList = lazyAttributes.map(generateQueryExecution.bind(null, apiKey, device)).reduce(concat, []);
102102
async.series(funcList, function (err, results) {
103-
callback(err, results[0]);
103+
var json_object = {};
104+
results.forEach(function (result) {
105+
json_object = { ...json_object, ...result };
106+
});
107+
callback(err, json_object);
104108
});
105109
}
106110
});

0 commit comments

Comments
 (0)