From 432e4926eef97a9323782151198d2b260a89fc2e Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Tue, 16 Sep 2025 21:55:01 +0200 Subject: [PATCH] Fix jwt-token --- server/routes/detections.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/routes/detections.js b/server/routes/detections.js index a14e472..e543818 100644 --- a/server/routes/detections.js +++ b/server/routes/detections.js @@ -18,6 +18,7 @@ router.get('/', authenticateToken, async (req, res) => { try { // Get tenant from authenticated user context const tenantId = req.tenantId; + console.log('🔍 Detections - Tenant ID from request:', tenantId); if (!tenantId) { return res.status(400).json({ success: false, @@ -26,6 +27,7 @@ router.get('/', authenticateToken, async (req, res) => { } const tenant = await Tenant.findOne({ where: { slug: tenantId } }); + console.log('🔍 Detections - Tenant lookup result:', tenant ? `Found: ${tenant.slug}` : 'Not found'); if (!tenant) { return res.status(404).json({ success: false,