Fix variable name

This commit is contained in:
Yarmo Mackenbach 2021-04-15 23:21:12 +02:00
parent 72b1c058c1
commit 2299d339a3
No known key found for this signature in database
GPG key ID: 37367F4AF4087AD1

View file

@ -32,9 +32,9 @@ module.exports.fn = async (data, opts) => {
const resUser = await req(urlUser, null, { Accept: 'application/json' })
const jsonUser = await resUser.json()
const user = jsonUser.find((user) => user.username === match[2])
const user = jsonUser.find((user) => user.username === data.username)
if (!user) {
reject(`No user with username ${match[2]}`)
reject(`No user with username ${data.username}`)
}
const urlProject = `https://${data.domain}/api/v4/users/${user.id}/projects`