Apply suggestions from code review
parent
1cd03ea0b9
commit
c4d4dbd2b5
|
@ -2236,7 +2236,6 @@ async function handler(
|
||||||
!originalRescheduledBooking?.paid &&
|
!originalRescheduledBooking?.paid &&
|
||||||
!!booking;
|
!!booking;
|
||||||
|
|
||||||
console.log("Booking requires payment", bookingRequiresPayment, paymentAppData);
|
|
||||||
if (!isConfirmedByDefault && noEmail !== true && !bookingRequiresPayment) {
|
if (!isConfirmedByDefault && noEmail !== true && !bookingRequiresPayment) {
|
||||||
await sendOrganizerRequestEmail({ ...evt, additionalNotes });
|
await sendOrganizerRequestEmail({ ...evt, additionalNotes });
|
||||||
await sendAttendeeRequestEmail({ ...evt, additionalNotes }, attendeesList[0]);
|
await sendAttendeeRequestEmail({ ...evt, additionalNotes }, attendeesList[0]);
|
||||||
|
|
|
@ -44,9 +44,6 @@ async function getEventType(id: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getBooking(bookingId: number) {
|
async function getBooking(bookingId: number) {
|
||||||
log.silly("getBooking", {
|
|
||||||
bookingId,
|
|
||||||
});
|
|
||||||
const booking = await prisma.booking.findUnique({
|
const booking = await prisma.booking.findUnique({
|
||||||
where: {
|
where: {
|
||||||
id: bookingId,
|
id: bookingId,
|
||||||
|
@ -228,7 +225,6 @@ export async function handlePaymentSuccess(event: Stripe.Event) {
|
||||||
await prisma.$transaction([paymentUpdate, bookingUpdate]);
|
await prisma.$transaction([paymentUpdate, bookingUpdate]);
|
||||||
|
|
||||||
if (!isConfirmed) {
|
if (!isConfirmed) {
|
||||||
//TODO: Test an event that requires confirmation conditionally
|
|
||||||
if (!requiresConfirmation) {
|
if (!requiresConfirmation) {
|
||||||
await handleConfirmation({
|
await handleConfirmation({
|
||||||
user: userWithCredentials,
|
user: userWithCredentials,
|
||||||
|
|
Loading…
Reference in New Issue