Fix jwt-token

This commit is contained in:
2025-09-18 06:04:08 +02:00
parent 993b482d56
commit c618706a72
2 changed files with 13 additions and 5 deletions

View File

@@ -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);