Skip to content

Commit f73910b

Browse files
committed
fix: importing authutil.verifycookie to support new route call
1 parent 112868b commit f73910b

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

backend/routers/projects.router.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ const { ProjectController } = require('../controllers');
88
// Require user to be project manager or higher (commented out for now for current app to work succesfully without auth, will re-enable when auth is ready)
99
// router.use(Auth.authUser, Auth.requireMinimumRole(ROLES.PROJECT_MANAGER));
1010
// The base is /api/projects
11+
12+
import { AuthUtil } from '../middleware/auth.middleware';
13+
1114
router.get('/', ProjectController.project_list);
1215

1316
// Its a put because we have to send the PM projects to be filtered here
@@ -26,6 +29,10 @@ router.patch('/:ProjectId', ProjectController.updateManagedByUsers);
2629
router.post('/bulk-updates', ProjectController.bulkUpdateManagedByUsers);
2730

2831
// Update onboard/offboard visibility for a project
29-
router.patch('/:ProjectId/visibility', AuthUtil.verifyCookie, ProjectController.updateOnboardOffboardVisibility);
32+
router.patch(
33+
'/:ProjectId/visibility',
34+
AuthUtil.verifyCookie,
35+
ProjectController.updateOnboardOffboardVisibility,
36+
);
3037

3138
module.exports = router;

0 commit comments

Comments
 (0)