Fix jwt-token
This commit is contained in:
@@ -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
|
||||
const { io } = require('../index');
|
||||
|
||||
Reference in New Issue
Block a user