summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorsoohwa <none@none.none>2017-10-13 08:46:25 +0200
committersoohwa <none@none.none>2017-10-13 08:46:25 +0200
commitb55756216e19fa42af2f36cba58d2994094198f1 (patch)
tree46782606c5f0de9f9aafa74918e8b9e3f3b48a68 /models
parent77d23df87fdbf44e879cd6c4670f804ad3fe9653 (diff)
downloadwekan-b55756216e19fa42af2f36cba58d2994094198f1.tar.gz
wekan-b55756216e19fa42af2f36cba58d2994094198f1.tar.bz2
wekan-b55756216e19fa42af2f36cba58d2994094198f1.zip
fix lint errors
Diffstat (limited to 'models')
-rw-r--r--models/users.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/models/users.js b/models/users.js
index f11ec0db..6d57a3f8 100644
--- a/models/users.js
+++ b/models/users.js
@@ -605,24 +605,24 @@ if (Meteor.isServer) {
Authentication.checkUserId( req.userId);
const id = req.params.id;
const action = req.body.action;
- var data = Meteor.users.findOne({ _id: id });
- if (data != undefined) {
+ let data = Meteor.users.findOne({ _id: id });
+ if (data !== undefined) {
if (action === 'takeOwnership') {
data = Boards.find({
'members.userId': id,
'members.isAdmin': true,
- }).map(function(board) {
- if (board.hasMember(req.userId)) {
- board.removeMember(req.userId);
- }
- board.changeOwnership(id, req.userId);
- return {
- _id: board._id,
- title: board.title,
- };
- });
+ }).map(function(board) {
+ if (board.hasMember(req.userId)) {
+ board.removeMember(req.userId);
+ }
+ board.changeOwnership(id, req.userId);
+ return {
+ _id: board._id,
+ title: board.title,
+ };
+ });
} else {
- if ((action === 'disableLogin') && (id != req.userId)) {
+ if ((action === 'disableLogin') && (id !== req.userId)) {
Users.update({ _id: id }, { $set: { loginDisabled: true, 'services.resume.loginTokens': '' } });
} else if (action === 'enableLogin') {
Users.update({ _id: id }, { $set: { loginDisabled: '' } });