Skip to content

Commit

Permalink
count filtered set
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenGrider committed Nov 11, 2016
1 parent d9b0aef commit 438b7cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion UpStarMusic/database/queries/SearchArtists.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = (criteria, sortProperty, offset = 0, limit = 20) => {
.skip(offset)
.limit(limit);

return Promise.all([query, Artist.count()])
return Promise.all([query, Artist.find(buildQuery(criteria)).count()])
.then((results) => {
return {
all: results[0],
Expand Down

0 comments on commit 438b7cc

Please sign in to comment.