summaryrefslogtreecommitdiffstats
path: root/models/swimlanes.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/swimlanes.js
parenta0a482aa8efb3255a523de4524c8e09453d5571f (diff)
downloadwekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.tar.gz
wekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.tar.bz2
wekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.zip
Prettier & eslint project style update
Diffstat (limited to 'models/swimlanes.js')
-rw-r--r--models/swimlanes.js27
1 files changed, 11 insertions, 16 deletions
diff --git a/models/swimlanes.js b/models/swimlanes.js
index 82f73f79..769aaed3 100644
--- a/models/swimlanes.js
+++ b/models/swimlanes.js
@@ -120,7 +120,7 @@ Swimlanes.attachSchema(
type: String,
defaultValue: 'swimlane',
},
- })
+ }),
);
Swimlanes.allow({
@@ -153,7 +153,7 @@ Swimlanes.helpers({
}
// Copy all lists in swimlane
- Lists.find(query).forEach((list) => {
+ Lists.find(query).forEach(list => {
list.type = 'list';
list.swimlaneId = oldId;
list.boardId = boardId;
@@ -167,7 +167,7 @@ Swimlanes.helpers({
swimlaneId: this._id,
archived: false,
}),
- { sort: ['sort'] }
+ { sort: ['sort'] },
);
},
@@ -178,7 +178,7 @@ Swimlanes.helpers({
swimlaneId: { $in: [this._id, ''] },
archived: false,
},
- { sort: ['sort'] }
+ { sort: ['sort'] },
);
},
@@ -234,7 +234,7 @@ Swimlanes.mutations({
archive() {
if (this.isTemplateSwimlane()) {
- this.myLists().forEach((list) => {
+ this.myLists().forEach(list => {
return list.archive();
});
}
@@ -243,7 +243,7 @@ Swimlanes.mutations({
restore() {
if (this.isTemplateSwimlane()) {
- this.myLists().forEach((list) => {
+ this.myLists().forEach(list => {
return list.restore();
});
}
@@ -262,11 +262,6 @@ Swimlanes.mutations({
},
});
-Swimlanes.before.update((userId, doc, fieldNames, modifier, options) => {
- modifier.$set = modifier.$set || {};
- modifier.$set.modifiedAt = Date.now();
-});
-
Swimlanes.hookOptions.after.update = { fetchPrevious: false };
if (Meteor.isServer) {
@@ -292,11 +287,11 @@ if (Meteor.isServer) {
swimlaneId: { $in: [doc._id, ''] },
archived: false,
},
- { sort: ['sort'] }
+ { sort: ['sort'] },
);
if (lists.count() < 2) {
- lists.forEach((list) => {
+ lists.forEach(list => {
list.remove();
});
} else {
@@ -350,7 +345,7 @@ if (Meteor.isServer) {
_id: doc._id,
title: doc.title,
};
- }
+ },
),
});
} catch (error) {
@@ -372,7 +367,7 @@ if (Meteor.isServer) {
*/
JsonRoutes.add('GET', '/api/boards/:boardId/swimlanes/:swimlaneId', function(
req,
- res
+ res,
) {
try {
const paramBoardId = req.params.boardId;
@@ -459,7 +454,7 @@ if (Meteor.isServer) {
data: error,
});
}
- }
+ },
);
}