forked from Mirrors/doipjs
Fix request headers
This commit is contained in:
parent
5dfe2412c4
commit
b04e5046ed
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ const customRequestHandler = async (spData, opts) => {
|
||||||
const match = spData.proof.uri.match(reURI)
|
const match = spData.proof.uri.match(reURI)
|
||||||
|
|
||||||
const urlUser = `https://${match[1]}/api/v4/users?username=${match[2]}`
|
const urlUser = `https://${match[1]}/api/v4/users?username=${match[2]}`
|
||||||
const resUser = await req(urlUser, {}, { Accept: 'application/json' })
|
const resUser = await req(urlUser, 'json', { Accept: 'application/json' })
|
||||||
const jsonUser = await resUser.json()
|
const jsonUser = await resUser.json()
|
||||||
|
|
||||||
const user = jsonUser.find(user => user.username === match[2])
|
const user = jsonUser.find(user => user.username === match[2])
|
||||||
|
|
Loading…
Reference in a new issue