Skip to content

Commit

Permalink
updated function
Browse files Browse the repository at this point in the history
  • Loading branch information
elraphty committed Nov 15, 2024
1 parent efebe3c commit 3aedcb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ func (db database) UpdateBountyPaymentStatuses(bounty NewBounty) (NewBounty, err
"completion_date": bounty.CompletionDate,
}

db.db.Where("created", bounty.Created).Updates(bountyUpdates)
db.db.Model(&NewBounty{}).Where("created", bounty.Created).Updates(bountyUpdates)
return bounty, nil
}

Expand Down
1 change: 1 addition & 0 deletions handlers/bounty.go
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,7 @@ func (h *bountyHandler) UpdateBountyPaymentStatus(w http.ResponseWriter, r *http
bounty.PaymentPending = false
bounty.PaymentFailed = false
bounty.Paid = true

bounty.PaidDate = &now
bounty.Completed = true
bounty.CompletionDate = &now
Expand Down

0 comments on commit 3aedcb4

Please sign in to comment.