Skip to content

Commit

Permalink
(ref) change to one-liner
Browse files Browse the repository at this point in the history
  • Loading branch information
GoonTwo committed Dec 2, 2017
1 parent 2410ea5 commit b90db7f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### node etc ###
.vscode

# Logs
logs
Expand Down
2 changes: 1 addition & 1 deletion database/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const sequelize = process.env.DATABASE_URL ?
new Sequelize(process.env.DB_NAME || 'shiftly', process.env.DB_USER || 'postgres', process.env.DB_PASS || null, { host: process.env.DB_HOST || 'localhost', dialect: 'postgres' });

const db = config(sequelize);

debugger;
db.User.hasMany(db.Session, { as: 'session' });

// One-to-Many Relationships
Expand Down
4 changes: 1 addition & 3 deletions helpers/updateSchedules.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ const updateSchedules = (req, res, next) => {
}

Promise.all(promises)
.then(() => {
return db.Actual_Schedule.findAll();
})
.then(() => db.Actual_Schedule.findAll())
.then((newSchedules) => {
req.schedules = newSchedules;
next();
Expand Down

0 comments on commit b90db7f

Please sign in to comment.