0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-26 09:32:51 +00:00

why didn't i think about this sooner

This commit is contained in:
Víctor Losada Hernández
2024-05-09 08:24:27 +02:00
parent cca0f3b4dc
commit 5eeac603db

View File

@@ -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);