Fix jwt-token
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user