relynolli-server/handlers/cart/routes.go

22 lines
438 B
Go
Raw Permalink Normal View History

2024-03-15 21:27:45 +03:00
package cart
import (
"github.com/gin-gonic/gin"
"relynolli-server/handlers/cart/endpoints"
)
func HandleRoutes(parent *gin.RouterGroup) {
h := endpoints.GetHandlers()
cart := parent.Group("/cart")
2024-03-28 18:20:57 +03:00
itemRouter := cart.Group("/item")
2024-03-15 21:27:45 +03:00
{
cart.GET("", h.GetCartItems)
cart.POST("", h.CreateFUser)
}
2024-03-28 18:20:57 +03:00
{
itemRouter.POST("", h.CreateCartItem)
itemRouter.PATCH("", h.UpdateCartItem)
itemRouter.DELETE("", h.DeleteCartItem)
}
2024-03-15 21:27:45 +03:00
}