Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: write end date of premium subscriptions to db #2998

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

remoterami
Copy link
Collaborator

No description provided.

@@ -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, "")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: check array access if there is an element at position 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants