mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Change user endpoint
This commit is contained in:
parent
77da2e32c6
commit
0e58c36bae
3 changed files with 5 additions and 5 deletions
|
|
@ -24,15 +24,15 @@ proc parseProfile(js: JsonNode; id=""): Profile =
|
|||
|
||||
result.expandProfileEntities(js)
|
||||
|
||||
proc parseUserShow*(js: JsonNode; username: string): Profile =
|
||||
if js.isNull: return
|
||||
proc parseUserLookup*(js: JsonNode; username: string): Profile =
|
||||
if js.isNull or js.kind == JArray and js.len == 0: return
|
||||
with error, js{"errors"}:
|
||||
result = Profile(username: username)
|
||||
if error.getError == suspended:
|
||||
result.suspended = true
|
||||
return
|
||||
|
||||
result = parseProfile(js)
|
||||
result = parseProfile(js[0])
|
||||
|
||||
proc parseGraphProfile*(js: JsonNode; username: string): Profile =
|
||||
if js.isNull: return
|
||||
|
|
|
|||
Loading…
Reference in a new issue