Skip to content

Commit

Permalink
editing bug fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
amiparadis250 committed Mar 8, 2024
1 parent 4688142 commit 26d6af5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/routes/blogRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ router.post('/', upload.single('file'),isLogin,isAdmin, async (req:any, res) =>
});

// Update a blog by ID
router.patch('/:id', upload.single('file'),isLogin,isAdmin, async (req:any, res) => {
router.put('/:id', upload.single('file'),isLogin,isAdmin, async (req:any, res) => {
try {
// Validate request body
const { error } = updateBlogValidation.validate(req.body);
Expand Down
2 changes: 1 addition & 1 deletion src/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@
}
}
},
"patch": {
"put": {
"summary": "Update a blog",
"tags": ["Blogs"],
"parameters": [
Expand Down

0 comments on commit 26d6af5

Please sign in to comment.