fix(gravatar): 🐛 not getting actual props
This commit is contained in:
parent
7b7364fcb9
commit
681f78ee98
|
@ -72,15 +72,19 @@ export default translator({
|
||||||
`gravatar: upload failed with ${uploadResult.status}`
|
`gravatar: upload failed with ${uploadResult.status}`
|
||||||
)
|
)
|
||||||
|
|
||||||
const uprRes: { email_hash: string; image_id: string } =
|
const uprRes: {
|
||||||
await uploadResult.json(),
|
user: { email_hash: string }
|
||||||
{ image_id } = uprRes,
|
image: { image_id: string }
|
||||||
|
} = await uploadResult.json(),
|
||||||
|
{
|
||||||
|
image: { image_id },
|
||||||
|
} = uprRes,
|
||||||
email_hash = email
|
email_hash = email
|
||||||
? crypto
|
? crypto
|
||||||
.createHash("md5")
|
.createHash("md5")
|
||||||
.update(email.toLowerCase())
|
.update(email.toLowerCase())
|
||||||
.digest("hex")
|
.digest("hex")
|
||||||
: uprRes.email_hash
|
: uprRes.user.email_hash
|
||||||
|
|
||||||
// set its alt text
|
// set its alt text
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue