mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
mongodb - dereference aggregateCursor (#696)
new node.js client library moved aggregate response - using toArray to return result-set in msg.payload #693
This commit is contained in:
parent
aa45796a98
commit
4ae0818a4b
@ -279,8 +279,16 @@ module.exports = function(RED) {
|
||||
node.error(err);
|
||||
}
|
||||
else {
|
||||
msg.payload = result;
|
||||
node.send(msg);
|
||||
cursor.toArray(function(cursorError, cursorDocs) {
|
||||
console.log(cursorDocs);
|
||||
if (cursorError) {
|
||||
node.error(cursorError);
|
||||
}
|
||||
else {
|
||||
msg.payload = cursorDocs;
|
||||
node.send(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user