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)
|
||||
}
|
||||
|
||||
rc.CartItemView(c)
|
||||
c.Redirect(http.StatusFound, "/cart")
|
||||
}
|
||||
|
||||
func (rc *cartItemController) EditItemHandler(c *gin.Context) {
|
||||
@@ -212,7 +212,7 @@ func (rc *cartItemController) EditItemHandler(c *gin.Context) {
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
rc.CartItemView(c)
|
||||
c.Redirect(http.StatusFound, "/cart")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ func (rc *cartItemController) EditItemHandler(c *gin.Context) {
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
rc.CartItemView(c)
|
||||
c.Redirect(http.StatusFound, "/cart")
|
||||
}
|
||||
|
||||
func (rc *cartItemController) CheckoutView(c *gin.Context) {
|
||||
@@ -249,5 +249,5 @@ func (rc *cartItemController) CheckoutView(c *gin.Context) {
|
||||
}
|
||||
|
||||
func (rc *cartItemController) CheckoutHandler(*gin.Context) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user