File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -365,9 +365,9 @@ executables:
365365 url: " http://pi.hole/admin/api.php?disable=$DURATION &auth=$PWHASH "
366366 logResponse: true # log the response body
367367 validStatusCodes: [200] # only consider the execution successful if the status code is 200
368- # transform the response body with jq
368+ # transform the response body with a Expr expression
369369 transformResponse: |
370- if .status == " disabled " then .status = " pause " else . end
370+ " paused: " + string(fromJSON(body)[ " status " ] == " disabled " )
371371` ` `
372372
373373# #### render
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ func RequestExecWithBody(opts ...Option) *executable.Executable {
6060func RequestExecWithTransform (opts ... Option ) * executable.Executable {
6161 name := "request-with-transform"
6262 docstring := requestBaseDesc +
63- "The `transformResponse` field is optional and can be used to transform the response using a jq query ."
63+ "The `transformResponse` field is optional and can be used to transform the response using an Expr expression ."
6464 e := & executable.Executable {
6565 Verb : "run" ,
6666 Name : name ,
You can’t perform that action at this time.
0 commit comments