redirect cart

This commit is contained in:
2025-03-06 00:05:24 +01:00
parent a88be8de62
commit cbaf48123f

View File

@@ -203,7 +203,7 @@ func (rc *cartItemController) DeleteItemHandler(c *gin.Context) {
c.HTML(http.StatusOK, "index.html", data) c.HTML(http.StatusOK, "index.html", data)
} }
rc.CartItemView(c) c.Redirect(http.StatusFound, "/cart")
} }
func (rc *cartItemController) EditItemHandler(c *gin.Context) { func (rc *cartItemController) EditItemHandler(c *gin.Context) {
@@ -212,7 +212,7 @@ func (rc *cartItemController) EditItemHandler(c *gin.Context) {
if err != nil { if err != nil {
fmt.Println(err) fmt.Println(err)
rc.CartItemView(c) c.Redirect(http.StatusFound, "/cart")
return return
} }
@@ -236,7 +236,7 @@ func (rc *cartItemController) EditItemHandler(c *gin.Context) {
fmt.Println(err) fmt.Println(err)
} }
rc.CartItemView(c) c.Redirect(http.StatusFound, "/cart")
} }
func (rc *cartItemController) CheckoutView(c *gin.Context) { func (rc *cartItemController) CheckoutView(c *gin.Context) {