Fix request headers

This commit is contained in:
Yarmo Mackenbach 2020-11-03 00:14:19 +01:00
parent 5dfe2412c4
commit b04e5046ed

View file

@ -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])