Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "fa6e50458ab28f21",
- "type": "http in",
- "z": "56e440dc8dd2ea6a",
- "name": "",
- "url": "/t",
- "method": "post",
- "upload": true,
- "swaggerDoc": "",
- "x": 680,
- "y": 560,
- "wires": [
- [
- "ba1ab5782646f971"
- ]
- ]
- },
- {
- "id": "4a02c0966170e3fc",
- "type": "http response",
- "z": "56e440dc8dd2ea6a",
- "name": "",
- "statusCode": "201",
- "headers": {},
- "x": 1470,
- "y": 620,
- "wires": []
- },
- {
- "id": "ba1ab5782646f971",
- "type": "function",
- "z": "56e440dc8dd2ea6a",
- "name": "store todo in todolist ",
- "func": "let something = msg.payload;\n\n\nsomething.data = something.data +1\n\n\nmsg.payload = {\n body: {\n sourceSummary: something.data,\n errorNumbers: \"errorNumbers\",\n missingNumbers: \"missingNumbers\"\n }\n};\n\nreturn msg;",
- "outputs": 1,
- "timeout": 0,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 980,
- "y": 560,
- "wires": [
- [
- "4a02c0966170e3fc",
- "79597d782ee66032",
- "6516b4a1d38676a7"
- ]
- ]
- },
- {
- "id": "c2f59bb1732d49d8",
- "type": "file in",
- "z": "56e440dc8dd2ea6a",
- "name": "",
- "filename": "/home/sites/nodeRed/logs/write6",
- "filenameType": "str",
- "format": "lines",
- "chunk": false,
- "sendError": false,
- "encoding": "none",
- "allProps": false,
- "x": 900,
- "y": 900,
- "wires": [
- [
- "dc396921c5364672"
- ]
- ]
- },
- {
- "id": "822be60b8271810d",
- "type": "inject",
- "z": "56e440dc8dd2ea6a",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "object",
- "payloadType": "date",
- "x": 630,
- "y": 900,
- "wires": [
- [
- "c2f59bb1732d49d8"
- ]
- ]
- },
- {
- "id": "b57ea6e955dbc53b",
- "type": "debug",
- "z": "56e440dc8dd2ea6a",
- "name": "debug 6",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 1600,
- "y": 900,
- "wires": []
- },
- {
- "id": "e0bbe659bc92c364",
- "type": "file",
- "z": "56e440dc8dd2ea6a",
- "name": "",
- "filename": "/home/sites/nodeRed/logs/write6",
- "filenameType": "str",
- "appendNewline": true,
- "createDir": true,
- "overwriteFile": "false",
- "encoding": "none",
- "x": 1800,
- "y": 760,
- "wires": [
- []
- ]
- },
- {
- "id": "215b6255fe5b2316",
- "type": "split",
- "z": "56e440dc8dd2ea6a",
- "name": "",
- "splt": "\\n",
- "spltType": "str",
- "arraySplt": 1,
- "arraySpltType": "len",
- "stream": false,
- "addname": "",
- "property": "payload",
- "x": 1230,
- "y": 900,
- "wires": [
- [
- "aee634607ea0c4a0"
- ]
- ]
- },
- {
- "id": "5d72bfe8b1f6bf32",
- "type": "json",
- "z": "56e440dc8dd2ea6a",
- "name": "",
- "property": "payload",
- "action": "",
- "pretty": false,
- "x": 1470,
- "y": 900,
- "wires": [
- [
- "b57ea6e955dbc53b"
- ]
- ]
- },
- {
- "id": "aee634607ea0c4a0",
- "type": "switch",
- "z": "56e440dc8dd2ea6a",
- "name": "",
- "property": "payload",
- "propertyType": "msg",
- "rules": [
- {
- "t": "nempty"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 1,
- "x": 1350,
- "y": 900,
- "wires": [
- [
- "5d72bfe8b1f6bf32"
- ]
- ]
- },
- {
- "id": "6516b4a1d38676a7",
- "type": "function",
- "z": "56e440dc8dd2ea6a",
- "name": "function 2",
- "func": "const timestamp = dateFormat(new Date(), \"yyyy-mm-dd h:MM:ss\");\nmsg.payload.time = timestamp;\nreturn msg;",
- "outputs": 1,
- "timeout": 0,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [
- {
- "var": "dateFormat",
- "module": "dateformat"
- }
- ],
- "x": 1450,
- "y": 740,
- "wires": [
- [
- "e0bbe659bc92c364"
- ]
- ]
- },
- {
- "id": "dc396921c5364672",
- "type": "switch",
- "z": "56e440dc8dd2ea6a",
- "name": "",
- "property": "payload",
- "propertyType": "msg",
- "rules": [
- {
- "t": "tail",
- "v": "8",
- "vt": "num"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 1,
- "x": 1110,
- "y": 900,
- "wires": [
- [
- "215b6255fe5b2316"
- ]
- ]
- },
- {
- "id": "79597d782ee66032",
- "type": "debug",
- "z": "56e440dc8dd2ea6a",
- "name": "debug 2",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "true",
- "targetType": "full",
- "statusVal": "",
- "statusType": "auto",
- "x": 1350,
- "y": 500,
- "wires": []
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement