Skip to content

Commit cf9c783

Browse files
committed
fix: change PATCH to PUT for UpdatePostById endpoint
1 parent f49bf40 commit cf9c783

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

routes/post_route.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func Post(route *gin.Engine, injector *do.Injector) {
1919
routes.POST("", middleware.Authenticate(jwtService), postController.CreatePost)
2020
routes.GET("/:post_id", postController.GetPostById)
2121
routes.DELETE("/:post_id", middleware.Authenticate(jwtService), postController.DeletePostById)
22-
routes.PATCH("/:post_id", middleware.Authenticate(jwtService), postController.UpdatePostById)
22+
routes.PUT("/:post_id", middleware.Authenticate(jwtService), postController.UpdatePostById)
2323
routes.GET("", postController.GetAllPosts)
2424
}
2525
}

0 commit comments

Comments
 (0)