Skip to content

Commit

Permalink
make the wheres stick
Browse files Browse the repository at this point in the history
  • Loading branch information
spruce-bruce committed Apr 10, 2017
1 parent f055b23 commit d8d28e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/src/application/user/user-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ module.exports = (bookshelf, emailService, renderTemplate) => {
console.log(query);
let model = bookshelf.model('user');
if (query.ids) {
model.where('id', 'in', query.ids);
model = model.where('id', 'in', query.ids);
}

if (query.email) {
model.where('email', query.email);
model = model.where('email', query.email);
}

return model.fetchAll();
Expand Down

0 comments on commit d8d28e6

Please sign in to comment.