mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-13 08:03:17 +02:00
More billing unit tests
This commit is contained in:
parent
f4c54a1643
commit
00af52411c
5 changed files with 168 additions and 12 deletions
server
|
@ -229,6 +229,8 @@ func (s *Server) handleAccountBillingSubscriptionUpdate(w http.ResponseWriter, r
|
|||
sub, err := s.stripe.GetSubscription(u.Billing.StripeSubscriptionID)
|
||||
if err != nil {
|
||||
return err
|
||||
} else if sub.Items == nil || len(sub.Items.Data) != 1 {
|
||||
return wrapErrHTTP(errHTTPBadRequestBillingRequestInvalid, "no items, or more than one item")
|
||||
}
|
||||
params := &stripe.SubscriptionParams{
|
||||
CancelAtPeriodEnd: stripe.Bool(false),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue