mirror of
https://github.com/status-im/codimd.git
synced 2025-01-12 01:44:15 +00:00
limit model should be .js files
Signed-off-by: Raccoon <raccoon@hackmd.io>
This commit is contained in:
parent
74f9e57148
commit
f04e63279c
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user