summaryrefslogtreecommitdiffstats
path: root/models/lists.js
diff options
context:
space:
mode:
authorJustin Reynolds <justinr1234@gmail.com>2019-06-28 12:52:09 -0500
committerJustin Reynolds <justinr1234@gmail.com>2019-06-28 12:56:51 -0500
commit3eb4d2c341b712268bd321173909e0a7b19a88c9 (patch)
tree25a8fcb088f3984e72a5bd3ded9e6a45376e0693 /models/lists.js
parenta0a482aa8efb3255a523de4524c8e09453d5571f (diff)
downloadwekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.tar.gz
wekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.tar.bz2
wekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.zip
Prettier & eslint project style update
Diffstat (limited to 'models/lists.js')
-rw-r--r--models/lists.js21
1 files changed, 8 insertions, 13 deletions
diff --git a/models/lists.js b/models/lists.js
index 6d77d7aa..e57849d7 100644
--- a/models/lists.js
+++ b/models/lists.js
@@ -156,7 +156,7 @@ Lists.attachSchema(
type: String,
defaultValue: 'list',
},
- })
+ }),
);
Lists.allow({
@@ -198,7 +198,7 @@ Lists.helpers({
swimlaneId: oldSwimlaneId,
listId: oldId,
archived: false,
- }).forEach((card) => {
+ }).forEach(card => {
card.copy(boardId, swimlaneId, _id);
});
},
@@ -262,7 +262,7 @@ Lists.mutations({
archive() {
if (this.isTemplateList()) {
- this.cards().forEach((card) => {
+ this.cards().forEach(card => {
return card.archive();
});
}
@@ -271,7 +271,7 @@ Lists.mutations({
restore() {
if (this.isTemplateList()) {
- this.allCards().forEach((card) => {
+ this.allCards().forEach(card => {
return card.restore();
});
}
@@ -346,15 +346,10 @@ if (Meteor.isServer) {
});
});
- Lists.before.update((userId, doc, fieldNames, modifier, options) => {
- modifier.$set = modifier.$set || {};
- modifier.$set.modifiedAt = Date.now();
- });
-
Lists.before.remove((userId, doc) => {
const cards = Cards.find({ listId: doc._id });
if (cards) {
- cards.forEach((card) => {
+ cards.forEach(card => {
Cards.remove(card._id);
});
}
@@ -404,7 +399,7 @@ if (Meteor.isServer) {
_id: doc._id,
title: doc.title,
};
- }
+ },
),
});
} catch (error) {
@@ -425,7 +420,7 @@ if (Meteor.isServer) {
*/
JsonRoutes.add('GET', '/api/boards/:boardId/lists/:listId', function(
req,
- res
+ res,
) {
try {
const paramBoardId = req.params.boardId;
@@ -492,7 +487,7 @@ if (Meteor.isServer) {
*/
JsonRoutes.add('DELETE', '/api/boards/:boardId/lists/:listId', function(
req,
- res
+ res,
) {
try {
Authentication.checkUserId(req.userId);