Fix jwt-token
This commit is contained in:
@@ -387,8 +387,10 @@ async function loginLocal(req, res, next) {
|
||||
// Get tenant information from request (set by multi-tenant auth middleware)
|
||||
let tenantId = null;
|
||||
if (req.tenant && req.tenant.id) {
|
||||
console.log('🔧 DEBUG: Looking for tenant with slug:', req.tenant.id);
|
||||
// Find the actual tenant in database
|
||||
const tenant = await Tenant.findOne({ where: { slug: req.tenant.id } });
|
||||
console.log('🔧 DEBUG: Found tenant:', tenant ? { id: tenant.id, slug: tenant.slug } : 'null');
|
||||
if (tenant) {
|
||||
tenantId = tenant.id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user