From f29b2d98bc2c8f3d458a1c217fc0bb1894fb7133 Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Wed, 17 Sep 2025 05:35:12 +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 f66da1c..f881f73 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('🔍 Looking for tenant with slug:', 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('🔍 Tenant lookup result:', tenant ? `Found tenant ${tenant.slug}` : 'Tenant not found'); if (!tenant) { return res.status(404).json({ success: false,