summaryrefslogtreecommitdiffstats
path: root/models/cards.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-01-25 19:05:44 +0200
committerGitHub <noreply@github.com>2019-01-25 19:05:44 +0200
commit5d6203f5f99d02fc508015c0889977da55eff2f1 (patch)
tree3663d29721ea91df9546bef35cd3896d0fecb1cb /models/cards.js
parent4a2576fbc200d397bcf7cede45316d9fb7e520dd (diff)
parent97d95b4bcbcab86629e368ea41bb9f00450b21f6 (diff)
downloadwekan-5d6203f5f99d02fc508015c0889977da55eff2f1.tar.gz
wekan-5d6203f5f99d02fc508015c0889977da55eff2f1.tar.bz2
wekan-5d6203f5f99d02fc508015c0889977da55eff2f1.zip
Merge pull request #2128 from bentiss/color-lists
Color lists
Diffstat (limited to 'models/cards.js')
-rw-r--r--models/cards.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/models/cards.js b/models/cards.js
index 9b32e89a..ff19a9a0 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -1526,6 +1526,10 @@ if (Meteor.isServer) {
Authentication.checkUserId(req.userId);
const paramBoardId = req.params.boardId;
const paramListId = req.params.listId;
+ const currentCards = Cards.find({
+ listId: paramListId,
+ archived: false,
+ }, { sort: ['sort'] });
const check = Users.findOne({
_id: req.body.authorId,
});
@@ -1538,7 +1542,7 @@ if (Meteor.isServer) {
description: req.body.description,
userId: req.body.authorId,
swimlaneId: req.body.swimlaneId,
- sort: 0,
+ sort: currentCards.count(),
members,
});
JsonRoutes.sendResult(res, {