feat(api): ✨ Add email to me
endpoint
This commit is contained in:
@ -8,7 +8,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
|||||||
const user = await authenticateUser(req)
|
const user = await authenticateUser(req)
|
||||||
if (isNotDefined(user))
|
if (isNotDefined(user))
|
||||||
return res.status(404).send({ message: 'User not found' })
|
return res.status(404).send({ message: 'User not found' })
|
||||||
return res.send({ id: user.id })
|
return res.send({ id: user.id, email: user.email })
|
||||||
}
|
}
|
||||||
return methodNotAllowed(res)
|
return methodNotAllowed(res)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user