From aff927b4f462d7d8639d3606d95b3e1f4a4bd5b3 Mon Sep 17 00:00:00 2001 From: Jonathan Bernard <jonathan@jdbernard.com> Date: Mon, 20 Dec 2021 17:42:55 -0600 Subject: [PATCH] Fix for Nim 1.6.2 --- private/api.nim | 6 +++--- private/version.nim | 2 +- ptk.nimble | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/private/api.nim b/private/api.nim index 9cebbfd..42c433e 100644 --- a/private/api.nim +++ b/private/api.nim @@ -1,7 +1,7 @@ ## Personal Time Keeping API Interface ## =================================== -import asyncdispatch, base64, bcrypt, cliutils, docopt, jester, json, logging, +import asyncdispatch, base64, bcrypt, cliutils, docopt, httpcore, jester, json, logging, sequtils, strutils, os, tables, times, uuids import nre except toSeq @@ -61,10 +61,10 @@ template checkAuth(cfg: PtkApiCfg) = var user {.inject.}: PtkUser = PtkUser() try: - if not request.headers.hasKey("Authorization"): + if not headers(request).hasKey("Authorization"): raiseEx "No auth token." - let headerVal = request.headers["Authorization"] + let headerVal = headers(request)["Authorization"] if not headerVal.startsWith("Basic "): raiseEx "Invalid Authorization type (only 'Basic' is supported)." diff --git a/private/version.nim b/private/version.nim index f6205c8..8e686b0 100644 --- a/private/version.nim +++ b/private/version.nim @@ -1 +1 @@ -const PTK_VERSION* = "1.0.10" \ No newline at end of file +const PTK_VERSION* = "1.0.11" \ No newline at end of file diff --git a/ptk.nimble b/ptk.nimble index 30df690..ad1fa79 100644 --- a/ptk.nimble +++ b/ptk.nimble @@ -1,6 +1,6 @@ # Package -version = "1.0.10" +version = "1.0.11" author = "Jonathan Bernard" description = "Personal Time Keeper" license = "MIT"