improve logging?

This commit is contained in:
Thomas Ruoff
2022-06-23 21:36:43 +02:00
committed by Thomas Ruoff
parent 942066bc7a
commit 00002a62d2
15 changed files with 91 additions and 50 deletions

View File

@@ -7,6 +7,7 @@ import {
sendBookingRejected,
sendBookingCanceled,
} from '../../../../helpers/mail'
import { log } from '../../../../helpers/log'
function changedStatus(
previous: Booking,
@@ -72,7 +73,7 @@ export default async function userHandler(
res.status(200).json(current)
} catch (error) {
console.error('failed patch booking', error)
log.error('failed patch booking', error)
res.status(400).end(`Failed to save booking: ${error.message}`)
}
break