Merge branch 'araq2' into devel
This commit is contained in:
commit
8f67b90997
54 changed files with 2479 additions and 340 deletions
|
|
@ -33,13 +33,13 @@ proc getSupporters(self: BountySource): Future[JsonNode] {.async.} =
|
|||
let response = await self.client.get(apiUrl &
|
||||
"/supporters?order=monthly&per_page=200&team_slug=" & self.team)
|
||||
doAssert response.status.startsWith($Http200)
|
||||
return parseJson(response.body)
|
||||
return parseJson(await response.body)
|
||||
|
||||
proc getGithubUser(username: string): Future[JsonNode] {.async.} =
|
||||
let client = newAsyncHttpClient()
|
||||
let response = await client.get(githubApiUrl & "/users/" & username)
|
||||
if response.status.startsWith($Http200):
|
||||
return parseJson(response.body)
|
||||
return parseJson(await response.body)
|
||||
else:
|
||||
echo("Could not get Github user: ", username, ". ", response.status)
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue