chore: Add logic for put and get by id handler
Some checks failed
Backend ci / build (push) Has been cancelled

This commit is contained in:
d3m0k1d
2026-02-04 12:14:35 +03:00
parent 83cf741f4e
commit 01b6ab746e
8 changed files with 195 additions and 16 deletions

View File

@@ -13,9 +13,9 @@ func Register(router *gin.Engine, db *sql.DB) {
posts := v1.Group("posts")
{
posts.GET("/", handler_posts.GetPosts)
posts.GET("/:id", GetPost)
posts.GET("/:id", handler_posts.GetPost)
posts.POST("/", handler_posts.CreatePost)
posts.PUT("/:id", UpdatePost)
posts.PUT("/:id", handler_posts.UpdatePost)
posts.DELETE("/:id", DeletePost)
}
}