Skip to content

Commit

Permalink
add: write end date of premium subscriptions to db
Browse files Browse the repository at this point in the history
  • Loading branch information
remoterami committed Jan 13, 2025
1 parent 2b2512b commit 75793c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/stripe.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ func StripeWebhook(w http.ResponseWriter, r *http.Request) {
http.Error(w, "error updating stripe mobile subscription, no users_app_subs id found for subscription id, customer: "+invoice.Customer.ID, http.StatusInternalServerError)
return
}
err = db.UpdateUserSubscription(tx, appSubID, true, 0, "")
err = db.UpdateUserSubscription(tx, appSubID, true, invoice.Lines.Data[0].Period.End, "")
if err != nil {
logger.WithError(err).Error("error updating stripe mobile subscription (paid)", invoice.Lines.Data[0].Subscription)
http.Error(w, "error updating stripe mobile subscription customer: "+invoice.Customer.ID, http.StatusInternalServerError)
Expand Down

0 comments on commit 75793c3

Please sign in to comment.