mirror of
https://github.com/vacp2p/nim-jwt.git
synced 2026-01-08 19:57:59 -05:00
Nim 2.0.0 compatibility (#21)
This commit is contained in:
@@ -15,7 +15,7 @@ proc checkKeysExists*(node: JsonNode, keys: varargs[string]) =
|
||||
raise newException(KeyError, "$# is not present." % key)
|
||||
|
||||
proc encodeUrlSafe*(s: openarray[byte]): string =
|
||||
when NimMajor >= 1 and (NimMinor >= 1 or NimPatch >= 2):
|
||||
when (NimMajor >= 1 and (NimMinor >= 1 or NimPatch >= 2)) or NimMajor >= 2:
|
||||
result = base64.encode(s)
|
||||
else:
|
||||
result = base64.encode(s, newLine="")
|
||||
|
||||
Reference in New Issue
Block a user