summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorboeserwolf <github@noxware.de>2020-04-19 12:30:21 +0300
committerboeserwolf <github@noxware.de>2020-04-19 13:49:07 +0300
commit10fcc19b7f9307e71f01b6abca055806d69f7d4e (patch)
treee236eb00f9b72ca67b0113f49d45803eccd55477 /server
parent9f396e9038712e0223cbd47b7bc14253610f9af9 (diff)
downloadwekan-10fcc19b7f9307e71f01b6abca055806d69f7d4e.tar.gz
wekan-10fcc19b7f9307e71f01b6abca055806d69f7d4e.tar.bz2
wekan-10fcc19b7f9307e71f01b6abca055806d69f7d4e.zip
Add sortDefault helper for sorting boards
Diffstat (limited to 'server')
-rw-r--r--server/publications/boards.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/publications/boards.js b/server/publications/boards.js
index 6fbd9860..b54f27a8 100644
--- a/server/publications/boards.js
+++ b/server/publications/boards.js
@@ -36,6 +36,7 @@ Meteor.publish('boards', function() {
permission: 1,
type: 1,
},
+ sort: { sort: 1 /* boards default sorting */ },
},
);
});
@@ -61,6 +62,7 @@ Meteor.publish('archivedBoards', function() {
slug: 1,
title: 1,
},
+ sort: { sort: 1 /* boards default sorting */ },
},
);
});
@@ -90,7 +92,7 @@ Meteor.publishRelations('board', function(boardId, isArchived) {
$or,
// Sort required to ensure oplog usage
},
- { limit: 1, sort: { _id: 1 } },
+ { limit: 1, sort: { sort: 1 /* boards default sorting */, _id: 1 } },
),
function(boardId, board) {
this.cursor(Lists.find({ boardId, archived: isArchived }));