File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
src/flows/pipes/Notification/endpoints/HTTP Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,10 @@ export default register => {
4545 messageFn: messageFn,
4646 crit: trigger,
4747 )
48- |> monitor["notify"](data: notification, endpoint: http["endpoint"](url: "${ data . url } ")(mapFn: (r) => {
49- body = {r with _version: 1}
50- return {headers: {${ _headers } }, data: json["encode"](v: body)}
48+ |> monitor["notify"](data: notification, endpoint: http.endpoint(url: "${ data . url } ")(
49+ mapFn: (r) => {
50+ body = {r with _version: 1}
51+ return {headers: {${ _headers } }, data: json.encode(v: body)}
5152 }))`
5253 return out
5354 } ,
@@ -72,9 +73,11 @@ export default register => {
7273 } , [ ] )
7374 . join ( ', ' )
7475
75- return `http["endpoint"](url: "${ data . url } ")(mapFn: (r) => {
76- return {headers: {${ _headers } }, data: json["encode"](v: "${ TEST_NOTIFICATION } ")}
77- })
76+ return `http.post(
77+ url: "${ data . url } ",
78+ headers: {${ _headers } },
79+ data: json.encode(v: { msg: "${ TEST_NOTIFICATION } "})
80+ )
7881
7982 array.from(rows: [{value: 0}])
8083 |> yield(name: "ignore")`
You can’t perform that action at this time.
0 commit comments