Fix(booking-job): Save pointer
All checks were successful
ktm-booking-bot/ktm-booking-bot/pipeline/head This commit looks good

This commit is contained in:
2022-10-10 05:32:31 +00:00
parent dcfa34176e
commit 5dfd117d93

View File

@@ -105,7 +105,7 @@ func (env *Env) BackgroundJobRunner() {
success := env.startBooking(&jobToDo, username, password, creditCardType, creditCard, creditCardCVV, creditCardExpiry)
if success {
jobToDo.Status = "success"
env.DB.Save(jobToDo)
env.DB.Save(&jobToDo)
fmt.Println("Successfully made a booking.")
} else {
// Sleep for 10 minutes before setting status to pending