fix printjob execution
All checks were successful
Go / build (push) Successful in 13m33s

two bugs here:
- accidently comparing with == instead != against error
- using return instead of continue during for loop
This commit is contained in:
2025-07-02 14:14:36 +02:00
parent 144e14ee62
commit a6e7baf087

View File

@@ -182,8 +182,9 @@ func (rc *printController) PrintHandler(c *gin.Context) {
for _, printJob := range printJobs {
err := printJob.Execute()
if err == nil {
return
if err != nil {
fmt.Printf("Error: %s\n", err)
continue
}
printJob.ShopItem.WasPrinted = true
@@ -192,7 +193,6 @@ func (rc *printController) PrintHandler(c *gin.Context) {
if err != nil {
fmt.Printf("Error: %s\n", err)
}
}
}