Skip to content

Commit

Permalink
Merge pull request #1 from Trumilnasit/Trumilnasit-patch-1
Browse files Browse the repository at this point in the history
Update projects.js
  • Loading branch information
Trumilnasit authored Oct 8, 2024
2 parents cedb9e5 + fd9d623 commit 32fca05
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/routes/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ router.get('/fetchallglobalprojects',fetchallglobalprojects);
router.get('/fetchalluserprojects', fetchuser,fetchalluserprojects);

// ROUTE 3 : Add a New Project : POST: "/api/projects/addproject". Login required
router.post('/addproject', fetchuser,addproject)
router.post('/addproject', fetchuser, [
body('title', 'Title is required').not().isEmpty(),
], addproject);

// ROUTE 4 : Update an Existing Project : PUT: "/api/projects/updateproject". Login required
router.put('/updateproject/:id', fetchuser, updateproject);
Expand All @@ -27,4 +29,4 @@ router.post('/uploadProjectImage', fetchuser, uploadProjectImage);
// ROUTE 7 : Get All User Project : GET: "/api/projects/getProjectImage". Login required
router.get('/getProjectImage', fetchuser, getProjectImage);

module.exports = router
module.exports = router

0 comments on commit 32fca05

Please sign in to comment.