From 25b26657da71da05b09fff48f1329ce936ae022b Mon Sep 17 00:00:00 2001 From: mayjs Date: Mon, 15 May 2017 22:10:46 +0200 Subject: [PATCH] Fixed eslint errors --- models/boards.js | 18 +++++++++--------- models/users.js | 2 +- server/authentication.js | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/models/boards.js b/models/boards.js index 57493fd32..366a680a3 100644 --- a/models/boards.js +++ b/models/boards.js @@ -560,15 +560,15 @@ if (Meteor.isServer) { Authentication.checkLoggedIn(req.userId); const data = Boards.find({ - archived: false, - 'members.userId': req.userId, - }, { - sort: ['title'], - }).map(function(board) { - return { - _id: board._id, - title: board.title - } + archived: false, + 'members.userId': req.userId, + }, { + sort: ['title'], + }).map(function(board) { + return { + _id: board._id, + title: board.title, + }; }); JsonRoutes.sendResult(res, {code: 200, data}); diff --git a/models/users.js b/models/users.js index 01709f491..29504aa8f 100644 --- a/models/users.js +++ b/models/users.js @@ -533,7 +533,7 @@ if (Meteor.isServer) { delete data.services; JsonRoutes.sendResult(res, { code: 200, - data + data, }); }); diff --git a/server/authentication.js b/server/authentication.js index 14e9d1c43..23ed8f562 100644 --- a/server/authentication.js +++ b/server/authentication.js @@ -37,16 +37,16 @@ Meteor.startup(() => { error.statusCode = 403; throw error; } - } + }; // Helper function. Will throw an error if the user does not have read only access to the given board Authentication.checkBoardAccess = function(userId, boardId) { Authentication.checkLoggedIn(userId); const board = Boards.findOne({ _id: boardId }); - const normalAccess = board.permission === 'public' || board.members.some(e => e.userId === userId); + const normalAccess = board.permission === 'public' || board.members.some((e) => e.userId === userId); Authentication.checkAdminOrCondition(userId, normalAccess); - } + }; });