Fix jwt-token

This commit is contained in:
2025-09-16 07:11:32 +02:00
parent 50f60035b5
commit fbd03aeffc
3 changed files with 31 additions and 1 deletions

View File

@@ -7,8 +7,10 @@ if (process.env.NODE_ENV !== 'test') {
// Check if models are already initialized (for tests)
if (global.__TEST_MODELS__) {
console.log(`🔧 DEBUG: Using global test models from models/index.js`);
module.exports = global.__TEST_MODELS__;
} else {
console.log(`🔧 DEBUG: Creating new models instance in models/index.js`);
// Configure database based on environment
let sequelize;
if (process.env.NODE_ENV === 'test') {