Fix jwt-token
This commit is contained in:
@@ -234,7 +234,7 @@ router.post('/tenants', async (req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Log management action
|
// Log management action
|
||||||
console.log(`Management: Admin ${req.user.username} creating tenant: ${tenantData.name}`);
|
console.log(`Management: Admin ${req.managementUser.username} creating tenant: ${tenantData.name}`);
|
||||||
|
|
||||||
const tenant = await Tenant.create(tenantData);
|
const tenant = await Tenant.create(tenantData);
|
||||||
|
|
||||||
@@ -302,7 +302,7 @@ router.put('/tenants/:id', async (req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Log management action
|
// Log management action
|
||||||
console.log(`Management: Admin ${req.user.username} updating tenant: ${tenant.name}`);
|
console.log(`Management: Admin ${req.managementUser.username} updating tenant: ${tenant.name}`);
|
||||||
|
|
||||||
await tenant.update(req.body);
|
await tenant.update(req.body);
|
||||||
|
|
||||||
@@ -344,7 +344,7 @@ router.delete('/tenants/:id', async (req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Log management action
|
// Log management action
|
||||||
console.log(`Management: Admin ${req.user.username} deleting tenant: ${tenant.name}`);
|
console.log(`Management: Admin ${req.managementUser.username} deleting tenant: ${tenant.name}`);
|
||||||
|
|
||||||
await tenant.destroy();
|
await tenant.destroy();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user