add(backend) Сделано API под корзину

This commit is contained in:
2026-06-22 21:12:48 +03:00
parent 814b93621d
commit a73d147e12
5 changed files with 130 additions and 2 deletions
+4
View File
@@ -48,6 +48,10 @@ func main() {
protected.DELETE("/items/:id", handlers.DeleteItem)
protected.PATCH("/items/:id", handlers.UpdateItem)
protected.POST("/items", handlers.AddItem)
protected.GET("/cart/", handlers.GetCart)
protected.POST("/cart/", handlers.AddToCart)
protected.PATCH("/cart/:id", handlers.UpdateCartItem)
protected.DELETE("/cart/:id", handlers.RemoveFromCart)
}
admin := protected.Group("/")