feat: login user telemetry
This commit is contained in:
@@ -85,6 +85,14 @@ router.post('/login', async (req, res) => {
|
|||||||
res.cookie('token', token, {
|
res.cookie('token', token, {
|
||||||
httpOnly: true
|
httpOnly: true
|
||||||
})
|
})
|
||||||
|
capture(
|
||||||
|
'maxun-oss-user-login',
|
||||||
|
{
|
||||||
|
email: user.email,
|
||||||
|
userId: user.id,
|
||||||
|
loggedInAt: new Date().toISOString()
|
||||||
|
}
|
||||||
|
)
|
||||||
res.json(user)
|
res.json(user)
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
res.status(400).send(`Could not login user - ${error.message}`)
|
res.status(400).send(`Could not login user - ${error.message}`)
|
||||||
|
|||||||
Reference in New Issue
Block a user