Browse Source
Bugfix/validation of missing price id in Stripe checkout session (#8379)
Fix validation of missing price id
pull/8376/head
Thomas Kaul
2 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
0 deletions
-
apps/api/src/services/subscription/subscription.service.ts
|
|
@ -53,6 +53,10 @@ export class SubscriptionService { |
|
|
priceId: string; |
|
|
priceId: string; |
|
|
user: UserWithSettings; |
|
|
user: UserWithSettings; |
|
|
}): Promise<CreateStripeCheckoutSessionResponse> { |
|
|
}): Promise<CreateStripeCheckoutSessionResponse> { |
|
|
|
|
|
if (!priceId) { |
|
|
|
|
|
throw new BadRequestException('Invalid priceId'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const subscriptionOffers: { |
|
|
const subscriptionOffers: { |
|
|
[offer in SubscriptionOfferKey]: SubscriptionOffer; |
|
|
[offer in SubscriptionOfferKey]: SubscriptionOffer; |
|
|
} = |
|
|
} = |
|
|
|