Skip to content

Commit

Permalink
Fix bookingController.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Aug 12, 2024
1 parent 4162848 commit 81bdf25
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/src/controllers/bookingController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ export const checkout = async (req: Request, res: Response) => {

await booking.save()

if (booking.status === movininTypes.BookingStatus.Paid && body.paymentIntentId && body.customerId) {
if (!await confirm(user, booking, false)) {
return res.sendStatus(400)
}
}

if (body.payLater) {
// Send confirmation email
if (!await confirm(user, booking, body.payLater)) {
Expand Down

0 comments on commit 81bdf25

Please sign in to comment.