From 5eeac603db2e51fd4c59047c249e0c4c9ad9ef8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Thu, 9 May 2024 08:24:27 +0200 Subject: [PATCH] why didn't i think about this sooner --- server/archive.api.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/archive.api.js b/server/archive.api.js index ee1be4b7a..a38eb269e 100644 --- a/server/archive.api.js +++ b/server/archive.api.js @@ -84,9 +84,7 @@ const archive = { .maxTimeMS(5000) .exec(); - const totalBrews = await HomebrewModel.countDocuments( - titleQuery - ).maxTimeMS(5000); + const totalBrews = brews.length; const totalPages = Math.ceil(totalBrews / pageSize); console.log('Total brews: ', totalBrews);