well, need to wait until mail is send or function is terminated

This commit is contained in:
Thomas Ruoff
2023-01-26 15:42:12 +01:00
parent 6b2af2c60f
commit abd6ac7a8d

View File

@@ -65,11 +65,11 @@ export default async function userHandler(
// TODO: this should really go into the schema // TODO: this should really go into the schema
try { try {
if (wasRejected(previous, current)) { if (wasRejected(previous, current)) {
sendBookingRejected(current) await sendBookingRejected(current)
} else if (wasConfirmed(previous, current)) { } else if (wasConfirmed(previous, current)) {
sendBookingConfirmed(current) await sendBookingConfirmed(current)
} else if (wasCanceled(previous, current)) { } else if (wasCanceled(previous, current)) {
sendBookingCanceled(current) await sendBookingCanceled(current)
} }
} catch (error) { } catch (error) {
log.error(`Failed to send booking ${current} for booking ${uuid}`) log.error(`Failed to send booking ${current} for booking ${uuid}`)