fix(#32): Strongly type the recurring string enum

This commit is contained in:
Josh Creek
2024-10-08 20:34:25 +01:00
parent e51aeb7c63
commit 73cb21d9de
+1 -1
View File
@@ -8,7 +8,7 @@ export const GET = async ({ params }) => {
const price = await stripeClient.prices.retrieve(product.default_price);
const isSubscription = (price.type as Stripe.Price.type) === 'recurring';
const isSubscription = price.type === ('recurring' as Stripe.Price.type);
product.isSubscription = isSubscription;
return json(product);
};