mirror of
https://github.com/wekan/wekan.git
synced 2026-02-02 06:31:47 +01:00
Add sortDefault helper for sorting boards
This commit is contained in:
parent
9f396e9038
commit
10fcc19b7f
10 changed files with 50 additions and 31 deletions
|
|
@ -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 }));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue