fix edititem
This commit is contained in:
@@ -106,6 +106,8 @@ func (rc *shopItemController) NewShopItemFromForm(ctx *gin.Context) (models.Shop
|
||||
fmt.Println("Error during pdftoppm: ", err.Error())
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
if name == "" || description == "" {
|
||||
@@ -154,6 +156,8 @@ func (rc *shopItemController) NewShopItemFromForm(ctx *gin.Context) (models.Shop
|
||||
PrintMode: printMode,
|
||||
}
|
||||
|
||||
fmt.Println("Creating Shopitem: ", shopItem)
|
||||
|
||||
for _, tagId := range tagIds {
|
||||
tag, err := repositories.Tags.GetById(tagId)
|
||||
|
||||
@@ -447,10 +451,13 @@ func (rc *shopItemController) EditItemHandler(c *gin.Context) {
|
||||
newShopItem.Name = shopItem.Name
|
||||
newShopItem.Abstract = shopItem.Abstract
|
||||
newShopItem.Description = shopItem.Description
|
||||
newShopItem.Category = shopItem.Category
|
||||
newShopItem.Variants = shopItem.Variants
|
||||
newShopItem.BasePrice = shopItem.BasePrice
|
||||
newShopItem.IsPublic = shopItem.IsPublic
|
||||
newShopItem.Tags = shopItem.Tags
|
||||
newShopItem.Variants = shopItem.Variants
|
||||
newShopItem.Image = shopItem.Image
|
||||
newShopItem.Pdf = shopItem.Pdf
|
||||
newShopItem.PrintMode = shopItem.PrintMode
|
||||
|
||||
tags, err := repositories.Tags.GetAll()
|
||||
|
||||
Reference in New Issue
Block a user