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
parent
commit
42e0c1dbe9
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 7
      apps/api/src/app/subscription/subscription.service.ts

7
apps/api/src/app/subscription/subscription.service.ts

@ -268,7 +268,12 @@ export class SubscriptionService {
const unsupportedLanguageCodes: Record< const unsupportedLanguageCodes: Record<
Exclude< Exclude<
(typeof SUPPORTED_LANGUAGE_CODES)[number], (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 true
> = { > = {

Loading…
Cancel
Save