More API refactoring

This commit is contained in:
Zed
2019-10-02 22:28:53 +02:00
parent bafe5fb550
commit bb83b6b6d3
5 changed files with 21 additions and 29 deletions

View File

@@ -53,8 +53,7 @@ proc getGuestToken(agent: string; force=false): Future[string] {.async.} =
let
headers = genHeaders({"authorization": auth}, agent, base, lang=false)
url = apiBase / tokenUrl
json = await fetchJson(url, headers)
json = await fetchJson(apiBase / tokenUrl, headers)
if json != nil:
result = json["guest_token"].to(string)