From 0775d77ba047f86ef7080df9e371c50e9f880097 Mon Sep 17 00:00:00 2001 From: supositware Date: Sat, 13 Mar 2021 20:20:05 +0100 Subject: [PATCH] Fixed an error --- models/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/index.js b/models/index.js index 3fc37192..2666fe1b 100644 --- a/models/index.js +++ b/models/index.js @@ -23,7 +23,7 @@ fs return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js'); }) .forEach(file => { - const model = sequelize['import'](path.join(__dirname, file)); + const model = require(path.join(__dirname, file))(sequelize, Sequelize.DataTypes) db[model.name] = model; });