mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
match cursor handling with parameter
This commit is contained in:
parent
9e7a8d5764
commit
8363a774e9
@ -274,13 +274,13 @@ module.exports = function(RED) {
|
||||
}
|
||||
else if (node.operation === "aggregate") {
|
||||
msg.payload = (Array.isArray(msg.payload)) ? msg.payload : [];
|
||||
coll.aggregate(msg.payload, function(err, result) {
|
||||
coll.aggregate(msg.payload, function(err, cursor) {
|
||||
if (err) {
|
||||
node.error(err);
|
||||
}
|
||||
else {
|
||||
cursor.toArray(function(cursorError, cursorDocs) {
|
||||
console.log(cursorDocs);
|
||||
//console.log(cursorDocs);
|
||||
if (cursorError) {
|
||||
node.error(cursorError);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user