"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.boardsRouter = void 0;
const express_1 = require("express");
const permissions_1 = require("../../util/config/permissions");
const boards_1 = require("../controller/boards");
const permission_1 = require("../middlewares/permission");
const router = (0, express_1.Router)();
router.get('/', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), boards_1.BoardsController.getBoardList);
router.get('/widget-categories', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), boards_1.BoardsController.getWidgetCategories);
router.get('/widget-categories/:categoryId/widgets', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), boards_1.BoardsController.getWidgetsByCategory);
router.get('/:boardId', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), boards_1.BoardsController.getBoardById);
router.patch('/:boardId', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), boards_1.BoardsController.saveBoard);
router.post('/', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), boards_1.BoardsController.createBoard);
router.delete('/:boardId', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), boards_1.BoardsController.deleteBoard);
router.get('/:boardId/membership', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), boards_1.BoardsController.getBoardMembers);
router.post('/:boardId/membership/add', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), boards_1.BoardsController.addMembership);
router.post('/:boardId/membership/remove', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), boards_1.BoardsController.removeMembership);
exports.boardsRouter = router;
//# sourceMappingURL=boards.js.map