mirror of
https://github.com/wekan/wekan.git
synced 2025-12-27 12:48:49 +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
|
|
@ -1474,7 +1474,7 @@ if (Meteor.isServer) {
|
|||
'members.userId': paramUserId,
|
||||
},
|
||||
{
|
||||
sort: ['title'],
|
||||
sort: { sort: 1 /* boards default sorting */ },
|
||||
},
|
||||
).map(function(board) {
|
||||
return {
|
||||
|
|
@ -1504,7 +1504,12 @@ if (Meteor.isServer) {
|
|||
Authentication.checkUserId(req.userId);
|
||||
JsonRoutes.sendResult(res, {
|
||||
code: 200,
|
||||
data: Boards.find({ permission: 'public' }).map(function(doc) {
|
||||
data: Boards.find(
|
||||
{ permission: 'public' },
|
||||
{
|
||||
sort: { sort: 1 /* boards default sorting */ },
|
||||
},
|
||||
).map(function(doc) {
|
||||
return {
|
||||
_id: doc._id,
|
||||
title: doc.title,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue