Replace restricted UserResultByIdQuery endpoint

Fixes #1433
This commit is contained in:
Zed 2026-08-17 06:30:18 +07:00
commit 0ac9bc2678
3 changed files with 29 additions and 2 deletions

View file

@ -58,7 +58,7 @@ proc getGraphUser*(username: string): Future[User] {.async.} =
proc getGraphUserById*(id: string): Future[User] {.async.} =
if id.len == 0 or id.any(c => not c.isDigit): return
let
url = apiReq(graphUserById, """{"rest_id": "$1"}""" % id)
url = apiReq(graphUserById, userByRestIdVars % id)
js = await fetchRaw(url)
result = parseGraphUser(js)