chore: prettier Server

This commit is contained in:
41666 2020-08-02 16:29:00 -04:00
parent d08c9e4829
commit 5119e1142c
No known key found for this signature in database
GPG key ID: BC51D07640DC10AF
5 changed files with 16 additions and 16 deletions

View file

@ -2,12 +2,12 @@ const log = new (require('../logger'))('models/index')
const glob = require('glob')
const path = require('path')
module.exports = sql => {
module.exports = (sql) => {
const models = {}
const modelFiles = glob.sync('./models/**/!(index).js')
log.debug('found models', modelFiles)
modelFiles.forEach(v => {
modelFiles.forEach((v) => {
let name = path.basename(v).replace('.js', '')
if (v === './models/index.js') {
log.debug('index.js hit, skipped')
@ -23,7 +23,7 @@ module.exports = sql => {
}
})
Object.keys(models).forEach(v => {
Object.keys(models).forEach((v) => {
if (models[v].hasOwnProperty('__associations')) {
models[v].__associations(models)
}