wip rm sessionid of cartitem after order creation

This commit is contained in:
2025-04-11 14:12:52 +02:00
parent b55bf67e57
commit d5c3d7fe75
2 changed files with 6 additions and 0 deletions

View File

@@ -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 {

View File

@@ -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)