Ver Fonte

Try to fix API get cards wrong order. Please test.

Thanks to mohammadZahedian, xator91 and xet7.

Fixes #5319
Lauri Ojansivu há 1 ano atrás
pai
commit
c570405d02
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      models/cards.js

+ 3 - 1
models/cards.js

@@ -3250,7 +3250,8 @@ if (Meteor.isServer) {
         boardId: paramBoardId,
         boardId: paramBoardId,
         listId: paramListId,
         listId: paramListId,
         archived: false,
         archived: false,
-      }).map(function(doc) {
+      },
+      { sort: ['sort'] }).map(function(doc) {
         return {
         return {
           _id: doc._id,
           _id: doc._id,
           title: doc.title,
           title: doc.title,
@@ -3260,6 +3261,7 @@ if (Meteor.isServer) {
           dueAt: doc.dueAt,
           dueAt: doc.dueAt,
           endAt: doc.endAt,
           endAt: doc.endAt,
           assignees: doc.assignees,
           assignees: doc.assignees,
+          sort: doc.sort,
         };
         };
       }),
       }),
     });
     });