set WasPrinted after printjob execution
All checks were successful
Go / build (push) Successful in 12m19s

This commit is contained in:
2025-07-02 00:33:11 +02:00
parent ad5573ee2c
commit 16c68cd0f8

View File

@@ -180,6 +180,12 @@ func (rc *printController) PrintHandler(c *gin.Context) {
executeJobs := func() {
for _, printJob := range printJobs {
err := printJob.Execute()
if err == nil {
return
}
printJob.ShopItem.WasPrinted = true
_, err = repositories.ShopItems.Update(printJob.ShopItem)
@@ -187,12 +193,6 @@ func (rc *printController) PrintHandler(c *gin.Context) {
fmt.Printf("Error: %s\n", err)
}
err := printJob.Execute()
if err == nil {
return
}
}
}