Fixed an error

This commit is contained in:
supositware 2021-03-13 20:20:05 +01:00
parent 069b2d1b4d
commit 0775d77ba0

View file

@ -23,7 +23,7 @@ fs
return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js'); return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js');
}) })
.forEach(file => { .forEach(file => {
const model = sequelize['import'](path.join(__dirname, file)); const model = require(path.join(__dirname, file))(sequelize, Sequelize.DataTypes)
db[model.name] = model; db[model.name] = model;
}); });