E2E and paid bookings fixes

This commit is contained in:
zomars committed 2022-05-11 14:36:38 -06:00
1 parent f2988870d5
commit 06702aa48a
8 files changed
+16 -6

No files matched your search

+2
View File
@@ -769,6 +769,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
try {
const [firstStripeCredential] = user.credentials.filter((cred) => cred.type == "stripe_payment");
if (!firstStripeCredential) return res.status(500).json({ message: "Missing payment credentials" });
if (!booking.user) booking.user = user;
const payment = await handlePayment(evt, eventType, firstStripeCredential, booking);