From d18c4cebcc858ebc21a0eab16fc41490a664ceab Mon Sep 17 00:00:00 2001 From: Guryash Date: Mon, 23 Dec 2024 00:49:37 +1300 Subject: [PATCH] fix: membership update bug --- api/controller/stripeController.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/controller/stripeController.ts b/api/controller/stripeController.ts index 5141dd1..c9fc1d0 100644 --- a/api/controller/stripeController.ts +++ b/api/controller/stripeController.ts @@ -121,12 +121,11 @@ export const handleWebhook = asyncHandler( if (event.type === "checkout.session.completed") { const session: Stripe.Checkout.Session = event.data.object; - - if ( + if (!( !session.metadata && !session.metadata!["priceId"] && !session.metadata!["isEventTicket"] - ) { + )) { if (session.metadata!["isEventTicket"] === "y") { completeTicketPurchase(session.id); } else if (session.metadata!["isEventTicket"] === "n") {