Updates to compile on Nim 0.19

This commit is contained in:
2019-01-17 13:18:25 -06:00
parent f8ccc831ef
commit d4db66a71e
2 changed files with 5 additions and 5 deletions

View File

@ -56,7 +56,7 @@ template checkAuth(cfg: PitApiCfg) =
stderr.writeLine "Auth failed: " & getCurrentExceptionMsg()
halt(
Http401,
headers & @{"Content-Type": TXT},
@{"Content-Type": TXT},
getCurrentExceptionMsg())
proc start*(cfg: PitApiCfg) =
@ -73,7 +73,7 @@ proc start*(cfg: PitApiCfg) =
resp("pong", TXT)
get "/issues":
checkAuth(cfg); if not authed: return true
checkAuth(cfg)
var args = queryParamsToCliArgs(request.params)
args = @["list"] & args
@ -84,10 +84,10 @@ proc start*(cfg: PitApiCfg) =
else: resp(stripAnsi(execResult[0]), TXT)
post "/issues":
checkAuth(cfg); if not authed: return true
checkAuth(cfg)
get "/issue/@issueId":
checkAuth(cfg); if not authed: return true
checkAuth(cfg)
var args = queryParamsToCliArgs(request.params)
args = @["list", @"issueId"] & args