Fix jwt-token

This commit is contained in:
2025-09-07 14:58:16 +02:00
parent f5969cf655
commit 6d9d6b9b3f

View File

@@ -381,7 +381,10 @@ router.post('/:id/approve', async (req, res) => {
}); });
} }
await device.update({ is_approved: approved }); await device.update({
is_approved: approved,
is_active: approved // Set device as active when approved, inactive when unapproved
});
// Emit real-time notification // Emit real-time notification
const { io } = require('../index'); const { io } = require('../index');