Browse Source

Fix type check of unsupported language codes in Stripe checkout session

pull/8189/head
Thomas Kaul 7 hours ago
parent
commit
330f25a85e
  1. 3
      apps/api/src/app/subscription/subscription.service.ts

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

@ -268,7 +268,8 @@ export class SubscriptionService {
const unsupportedLanguageCodes: Record<
Exclude<
(typeof SUPPORTED_LANGUAGE_CODES)[number],
// Extract removes OtherString of Stripe, which matches every string
// 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]

Loading…
Cancel
Save