Rename variable to avoid overloading the name.
This commit is contained in:
parent
567c2d2178
commit
8b46cc19d8
@ -81,14 +81,14 @@ proc start*(cfg: PitApiCfg) =
|
|||||||
get "/issues":
|
get "/issues":
|
||||||
checkAuth(cfg); if not authed: return true
|
checkAuth(cfg); if not authed: return true
|
||||||
|
|
||||||
var (stripAnsi, args) = paramsToArgs(request.params)
|
var (hasColor, args) = paramsToArgs(request.params)
|
||||||
args = @["list"] & args
|
args = @["list"] & args
|
||||||
|
|
||||||
info "args: \n" & args.join(" ")
|
info "args: \n" & args.join(" ")
|
||||||
let execResult = execWithOutput("pit", ".", args)
|
let execResult = execWithOutput("pit", ".", args)
|
||||||
if execResult[2] != 0: resp(Http500, stripAnsi($execResult[0] & "\n" & $execResult[1]), TXT)
|
if execResult[2] != 0: resp(Http500, stripAnsi($execResult[0] & "\n" & $execResult[1]), TXT)
|
||||||
else:
|
else:
|
||||||
if stripAnsi: resp(stripAnsi(execResult[0]), TXT)
|
if hasColor: resp(stripAnsi(execResult[0]), TXT)
|
||||||
else: resp(execResult[0], TXT)
|
else: resp(execResult[0], TXT)
|
||||||
|
|
||||||
post "/issues":
|
post "/issues":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user