0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-02 15:02:38 +00:00

fix pagination not applying sort

This commit is contained in:
Víctor Losada Hernández
2024-09-20 20:38:54 +02:00
parent 4fd358771a
commit b53b279241
2 changed files with 7 additions and 9 deletions

View File

@@ -62,8 +62,8 @@ const findBrews = async (req, res)=>{
};
await HomebrewModel.find(combinedQuery, projection)
.skip(skip)
.sort(sortConditions(sort, dir))
.skip(skip)
.limit(count)
.maxTimeMS(5000)
.exec()