summaryrefslogtreecommitdiffstats
path: root/models/cards.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2017-12-03 04:00:55 +0200
committerLauri Ojansivu <x@xet7.org>2017-12-03 04:00:55 +0200
commit7c403053e364ffe21d64edd961a55d0402582c07 (patch)
tree77f06a7afdb099c162a29c1bf9909b0761d85ea7 /models/cards.js
parentc52233cacf798e1eb0ad8dbbfe20354443b562e3 (diff)
downloadwekan-7c403053e364ffe21d64edd961a55d0402582c07.tar.gz
wekan-7c403053e364ffe21d64edd961a55d0402582c07.tar.bz2
wekan-7c403053e364ffe21d64edd961a55d0402582c07.zip
Fix lint errors.
Diffstat (limited to 'models/cards.js')
-rw-r--r--models/cards.js36
1 files changed, 18 insertions, 18 deletions
diff --git a/models/cards.js b/models/cards.js
index b62bfea8..8676dfdc 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -18,9 +18,9 @@ Cards.attachSchema(new SimpleSchema({
listId: {
type: String,
},
- // The system could work without this `boardId` information (we could deduce
- // the board identifier from the card), but it would make the system more
- // difficult to manage and less efficient.
+ // The system could work without this `boardId` information (we could deduce
+ // the board identifier from the card), but it would make the system more
+ // difficult to manage and less efficient.
boardId: {
type: String,
},
@@ -146,8 +146,8 @@ Cards.helpers({
cover() {
const cover = Attachments.findOne(this.coverId);
- // if we return a cover before it is fully stored, we will get errors when we try to display it
- // todo XXX we could return a default "upload pending" image in the meantime?
+ // if we return a cover before it is fully stored, we will get errors when we try to display it
+ // todo XXX we could return a default "upload pending" image in the meantime?
return cover && cover.url() && cover;
},
@@ -339,7 +339,7 @@ function cardMembers(userId, doc, fieldNames, modifier) {
if (!_.contains(fieldNames, 'members'))
return;
let memberId;
- // Say hello to the new member
+ // Say hello to the new member
if (modifier.$addToSet && modifier.$addToSet.members) {
memberId = modifier.$addToSet.members;
if (!_.contains(doc.members, memberId)) {
@@ -353,10 +353,10 @@ function cardMembers(userId, doc, fieldNames, modifier) {
}
}
- // Say goodbye to the former member
+ // Say goodbye to the former member
if (modifier.$pull && modifier.$pull.members) {
memberId = modifier.$pull.members;
- // Check that the former member is member of the card
+ // Check that the former member is member of the card
if (_.contains(doc.members, memberId)) {
Activities.insert({
userId,
@@ -396,8 +396,8 @@ function cardRemover(userId, doc) {
if (Meteor.isServer) {
- // Cards are often fetched within a board, so we create an index to make these
- // queries more efficient.
+ // Cards are often fetched within a board, so we create an index to make these
+ // queries more efficient.
Meteor.startup(() => {
Cards._collection._ensureIndex({boardId: 1, createdAt: -1});
});
@@ -406,24 +406,24 @@ if (Meteor.isServer) {
cardCreation(userId, doc);
});
- // New activity for card (un)archivage
+ // New activity for card (un)archivage
Cards.after.update((userId, doc, fieldNames) => {
cardState(userId, doc, fieldNames);
});
- //New activity for card moves
+ //New activity for card moves
Cards.after.update(function (userId, doc, fieldNames) {
const oldListId = this.previous.listId;
cardMove(userId, doc, fieldNames, oldListId);
});
- // Add a new activity if we add or remove a member to the card
+ // Add a new activity if we add or remove a member to the card
Cards.before.update((userId, doc, fieldNames, modifier) => {
cardMembers(userId, doc, fieldNames, modifier);
});
- // Remove all activities associated with a card if we remove the card
- // Remove also card_comments / checklists / attachments
+ // Remove all activities associated with a card if we remove the card
+ // Remove also card_comments / checklists / attachments
Cards.after.remove((userId, doc) => {
cardRemover(userId, doc);
});
@@ -498,12 +498,12 @@ if (Meteor.isServer) {
if (req.body.hasOwnProperty('title')) {
const newTitle = req.body.title;
Cards.direct.update({_id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false},
- {$set: {title: newTitle}});
+ {$set: {title: newTitle}});
}
if (req.body.hasOwnProperty('listId')) {
const newParamListId = req.body.listId;
Cards.direct.update({_id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false},
- {$set: {listId: newParamListId}});
+ {$set: {listId: newParamListId}});
const card = Cards.findOne({_id: paramCardId} );
cardMove(req.body.authorId, card, {fieldName: 'listId'}, paramListId);
@@ -512,7 +512,7 @@ if (Meteor.isServer) {
if (req.body.hasOwnProperty('description')) {
const newDescription = req.body.description;
Cards.direct.update({_id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false},
- {$set: {description: newDescription}});
+ {$set: {description: newDescription}});
}
JsonRoutes.sendResult(res, {
code: 200,