Fix jwt-token
This commit is contained in:
@@ -306,7 +306,7 @@ router.get('/profile', authenticateToken, async (req, res) => {
|
||||
tenant_id: req.user.tenant_id
|
||||
});
|
||||
|
||||
const { password_hash: _, ...userProfile } = req.user.toJSON();
|
||||
const { password_hash: _, ...userProfile } = req.user.toJSON ? req.user.toJSON() : req.user;
|
||||
|
||||
console.log('📤 /users/profile - Response:', userProfile);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user