diff --git a/lib/models/index.ts b/lib/models/index.ts index e8475493..1eb0adf5 100644 --- a/lib/models/index.ts +++ b/lib/models/index.ts @@ -43,7 +43,7 @@ const db: any = {} fs.readdirSync(__dirname) .filter(function (file) { - return (file.indexOf('.') !== 0) && (file !== 'index.js') + return (file.indexOf('.') !== 0) && (file !== 'index.js') && file.endsWith('.js') }) .forEach(function (file) { const model = sequelize.import(path.join(__dirname, file))