refactor(dokploy): fix ts errors

This commit is contained in:
Mauricio Siu
2024-10-24 00:55:59 -06:00
parent 647a5d05a6
commit bcc7afa3e4
2 changed files with 5 additions and 1 deletions

View File

@@ -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";
});

View File

@@ -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: ");
}