瀏覽代碼

Modified access to GET /api/boards/:boardId/lists

mayjs 8 年之前
父節點
當前提交
066593f9c3
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      models/lists.js

+ 2 - 1
models/lists.js

@@ -132,8 +132,9 @@ if (Meteor.isServer) {
 //LISTS REST API
 if (Meteor.isServer) {
   JsonRoutes.add('GET', '/api/boards/:boardId/lists', function (req, res, next) {
-    Authentication.checkUserId( req.userId);
     const paramBoardId = req.params.boardId;
+    Authentication.checkBoardAccess( req.userId, paramBoardId);
+
     JsonRoutes.sendResult(res, {
       code: 200,
       data: Lists.find({ boardId: paramBoardId, archived: false }).map(function (doc) {