Procházet zdrojové kódy

Fixed eslint errors

mayjs před 8 roky
rodič
revize
25b26657da
3 změnil soubory, kde provedl 13 přidání a 13 odebrání
  1. 9 9
      models/boards.js
  2. 1 1
      models/users.js
  3. 3 3
      server/authentication.js

+ 9 - 9
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});

+ 1 - 1
models/users.js

@@ -533,7 +533,7 @@ if (Meteor.isServer) {
     delete data.services;
     JsonRoutes.sendResult(res, {
       code: 200,
-      data
+      data,
     });
   });
 

+ 3 - 3
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);
-  }
+  };
 
 });