From 0e43da95762875a1c9a55a7f8e08e9ab3f69b073 Mon Sep 17 00:00:00 2001 From: Sean Sica <23294618+seansica@users.noreply.github.com> Date: Thu, 21 Dec 2023 12:37:13 -0500 Subject: [PATCH] Update ReferencesRepository.retrieveAll: Add .exec() to aggregation query for improved query execution --- app/repository/references-repository.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/repository/references-repository.js b/app/repository/references-repository.js index 1d0b264f..0bdb7be4 100644 --- a/app/repository/references-repository.js +++ b/app/repository/references-repository.js @@ -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) {