Fix jwt-token
This commit is contained in:
@@ -19,6 +19,11 @@ router.get('/', authenticateToken, async (req, res) => {
|
||||
// Get tenant from authenticated user context
|
||||
const tenantId = req.tenantId;
|
||||
console.log('🔍 Detections - Tenant ID from request:', tenantId);
|
||||
|
||||
// Debug: Check what tenants exist
|
||||
const allTenants = await Tenant.findAll({ attributes: ['id', 'slug'] });
|
||||
console.log('🔍 Detections - All tenants in database:', allTenants.map(t => ({ id: t.id, slug: t.slug })));
|
||||
|
||||
if (!tenantId) {
|
||||
return res.status(400).json({
|
||||
success: false,
|
||||
|
||||
Reference in New Issue
Block a user