From 29cb9426301e6b85755e56281b2fe05be17dd153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Sat, 11 Aug 2018 20:14:08 +0200 Subject: [PATCH] Fixed issue with accessed sorting --- server/handlers/frontpage.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/handlers/frontpage.js b/server/handlers/frontpage.js index bbbb5724..d010c0b6 100644 --- a/server/handlers/frontpage.js +++ b/server/handlers/frontpage.js @@ -27,6 +27,7 @@ function get_frontpage_lists(callback) { "id": 1, "title": 1, "viewers": 1, + "accessed": 1, "pinned": { $ifNull: [ "$pinned", 0 ] }, "description": { $ifNull: [ {$cond: { @@ -63,7 +64,7 @@ function get_frontpage_lists(callback) { { "$match": { frontpage: true, - count: {$gt: 0}, + count: {$gt: 3}, } }, { @@ -73,8 +74,8 @@ function get_frontpage_lists(callback) { "$sort" : { "pinned": -1, "viewers": -1, - "count": -1, "accessed": -1, + "count": -1, "title": 1 } },