wip rm sessionid of cartitem after order creation
This commit is contained in:
@@ -480,6 +480,11 @@ func (rc *cartItemController) OrderHandler(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for idx := range order.CartItems {
|
||||||
|
order.CartItems[idx].SessionId = "0"
|
||||||
|
repositories.CartItems.Update(order.CartItems[idx])
|
||||||
|
}
|
||||||
|
|
||||||
_, err = repositories.Orders.Update(order)
|
_, err = repositories.Orders.Update(order)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ func (rc *shopItemController) NewShopItemFromForm(ctx *gin.Context) (models.Shop
|
|||||||
|
|
||||||
dstPdf := ""
|
dstPdf := ""
|
||||||
pdf, err := ctx.FormFile("pdf")
|
pdf, err := ctx.FormFile("pdf")
|
||||||
|
fmt.Println(pdf)
|
||||||
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
dstPdf = filepath.Join("static/uploads", pdf.Filename)
|
dstPdf = filepath.Join("static/uploads", pdf.Filename)
|
||||||
|
|||||||
Reference in New Issue
Block a user