Use faker.js for mocked data and placeholder (#47)

This commit is contained in:
Simon Lecoq
2021-01-14 18:29:27 +01:00
committed by GitHub
parent c34e73fa68
commit d6e28e17bf
19 changed files with 1385 additions and 1070 deletions

View File

@@ -40,7 +40,7 @@
}
//Convert avatars to base64
console.debug(`metrics/compute/${login}/plugins > people > loading avatars`)
await Promise.all(result[type].map(async user => user.avatar = await imports.imgb64(user.avatarUrl)))
await Promise.all(result[type].map(async user => user.avatar = user.avatarUrl ? await imports.imgb64(user.avatarUrl) : "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mOcOnfpfwAGfgLYttYINwAAAABJRU5ErkJggg=="))
}
//Results