Skip to content

Commit

Permalink
Added deviceCount to count-capture
Browse files Browse the repository at this point in the history
  • Loading branch information
seansund committed May 17, 2017
1 parent 1e42e7b commit 98b6c7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/flow.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"type": "function",
"z": "75aa87d8.1db4f8",
"name": "Set msg payload",
"func": "var newMsg = {\n payload: {\n captureId: msg.captureId,\n createDate: new Date(),\n totalCount: 0\n }\n};\n\nreturn newMsg;",
"func": "var newMsg = {\n payload: {\n captureId: msg.captureId,\n createDate: new Date(),\n totalCount: 0,\n deviceCount: 0\n }\n};\n\nreturn newMsg;",
"outputs": 1,
"noerr": 0,
"x": 645.5,
Expand Down Expand Up @@ -174,7 +174,7 @@
"type": "function",
"z": "ad65b6aa.63a4b8",
"name": "Update data",
"func": "var inMsg = msg.inMsg;\n\nif (msg.payload.length > 0) {\n data = msg.payload[0];\n data.totalCount += inMsg.count;\n inMsg.countcapture_id = data._id;\n msg.payload = data;\n} else {\n msg.payload = {};\n}\n\nvar deviceMsg = {\n payload: inMsg\n};\n\nreturn [msg, deviceMsg];",
"func": "var inMsg = msg.inMsg;\n\nif (msg.payload.length > 0) {\n data = msg.payload[0];\n data.totalCount += inMsg.count;\n data.deviceCount += 1;\n inMsg.countcapture_id = data._id;\n msg.payload = data;\n} else {\n msg.payload = {};\n}\n\nvar deviceMsg = {\n payload: inMsg\n};\n\nreturn [msg, deviceMsg];",
"outputs": "2",
"noerr": 0,
"x": 596.5,
Expand Down

0 comments on commit 98b6c7b

Please sign in to comment.