Fix jwt-token

This commit is contained in:
2025-09-17 05:37:08 +02:00
parent f29b2d98bc
commit fc3808f848
2 changed files with 6 additions and 0 deletions

View File

@@ -28,6 +28,11 @@ 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');
// Debug: Let's see what tenants exist
const allTenants = await Tenant.findAll();
console.log('🔍 All tenants in database:', allTenants.map(t => ({ id: t.id, slug: t.slug })));
if (!tenant) {
return res.status(404).json({
success: false,