1 parent edc5e82 commit b7231ddCopy full SHA for b7231dd
1 file changed
api/src/controllers/torrent.js
@@ -463,7 +463,7 @@ export const getTorrentsPage = async ({
463
const combinedSort = {};
464
if (sortField) combinedSort[sortField] = sortDir;
465
if (query) combinedSort.confidenceScore = { $meta: "textScore" };
466
- combinedSort.created = -1;
+ if (!combinedSort.created) combinedSort.created = -1;
467
468
const torrents = await Torrent.aggregate([
469
...(query
0 commit comments