Browse Source
Bugfix/type check of unsupported language codes in Stripe checkout session (#8189)
Fix type check
pull/8158/merge
Thomas Kaul
8 hours ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
6 additions and
1 deletions
-
apps/api/src/app/subscription/subscription.service.ts
|
|
|
@ -268,7 +268,12 @@ export class SubscriptionService { |
|
|
|
const unsupportedLanguageCodes: Record< |
|
|
|
Exclude< |
|
|
|
(typeof SUPPORTED_LANGUAGE_CODES)[number], |
|
|
|
Stripe.Checkout.SessionCreateParams.Locale |
|
|
|
// Extract keeps only the Stripe locales that Ghostfolio supports.
|
|
|
|
// This also removes OtherString, which matches every string.
|
|
|
|
Extract< |
|
|
|
Stripe.Checkout.SessionCreateParams.Locale, |
|
|
|
(typeof SUPPORTED_LANGUAGE_CODES)[number] |
|
|
|
> |
|
|
|
>, |
|
|
|
true |
|
|
|
> = { |
|
|
|
|