From bcc7afa3e4d28ec0e52ed7183d6b6f686115ee42 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Thu, 24 Oct 2024 00:55:59 -0600 Subject: [PATCH] refactor(dokploy): fix ts errors --- .../components/dashboard/settings/billing/show-billing.tsx | 1 + apps/dokploy/pages/api/stripe/webhook.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx b/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx index 68275a21..8156f7d8 100644 --- a/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx +++ b/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx @@ -50,6 +50,7 @@ export const ShowBilling = () => { } }; const products = data?.products.filter((product) => { + // @ts-ignore const interval = product?.default_price?.recurring?.interval; return isAnnual ? interval === "year" : interval === "month"; }); diff --git a/apps/dokploy/pages/api/stripe/webhook.ts b/apps/dokploy/pages/api/stripe/webhook.ts index 0dafdcce..ffbb6736 100644 --- a/apps/dokploy/pages/api/stripe/webhook.ts +++ b/apps/dokploy/pages/api/stripe/webhook.ts @@ -34,7 +34,10 @@ export default async function handler( try { event = stripe.webhooks.constructEvent(buf, sig, endpointSecret); } catch (err) { - console.error("Webhook signature verification failed.", err.message); + console.error( + "Webhook signature verification failed.", + err instanceof Error ? err.message : err, + ); return res.status(400).send("Webhook Error: "); }