redirect cart
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user