Skip to content

Commit

Permalink
Update ReferencesRepository.retrieveAll: Add .exec() to aggregation q…
Browse files Browse the repository at this point in the history
…uery for improved query execution
  • Loading branch information
seansica committed Dec 21, 2023
1 parent 36120ac commit 0e43da9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/repository/references-repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ReferencesRepository {
aggregation.push(facet);

// Retrieve the documents
return await this.model.aggregate(aggregation);
return await this.model.aggregate(aggregation).exec();
}

async save(data) {
Expand Down

0 comments on commit 0e43da9

Please sign in to comment.