set WasPrinted after printjob execution
All checks were successful
Go / build (push) Successful in 12m19s
All checks were successful
Go / build (push) Successful in 12m19s
This commit is contained in:
@@ -180,6 +180,12 @@ func (rc *printController) PrintHandler(c *gin.Context) {
|
|||||||
|
|
||||||
executeJobs := func() {
|
executeJobs := func() {
|
||||||
for _, printJob := range printJobs {
|
for _, printJob := range printJobs {
|
||||||
|
err := printJob.Execute()
|
||||||
|
|
||||||
|
if err == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
printJob.ShopItem.WasPrinted = true
|
printJob.ShopItem.WasPrinted = true
|
||||||
_, err = repositories.ShopItems.Update(printJob.ShopItem)
|
_, err = repositories.ShopItems.Update(printJob.ShopItem)
|
||||||
|
|
||||||
@@ -187,12 +193,6 @@ func (rc *printController) PrintHandler(c *gin.Context) {
|
|||||||
fmt.Printf("Error: %s\n", err)
|
fmt.Printf("Error: %s\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
err := printJob.Execute()
|
|
||||||
|
|
||||||
if err == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user