From 93046eaa8c4999a0fd8ed223d95c3e4c3d159cc5 Mon Sep 17 00:00:00 2001 From: Haseeb Zaki <147314463+haseebzaki-07@users.noreply.github.com> Date: Mon, 21 Oct 2024 22:16:02 +0530 Subject: [PATCH] Update event.controller.js --- backend/controller/event.controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/controller/event.controller.js b/backend/controller/event.controller.js index 3ae72e20..36cf46aa 100644 --- a/backend/controller/event.controller.js +++ b/backend/controller/event.controller.js @@ -92,7 +92,7 @@ const bookEvent = async (req, res) => { res.status(200).json({ message: "Event booked successfully!" }); } catch (error) { - console.error(error); + logger.error("Error booking event:", error); res.status(500).json({ message: "Server error" }); } }; @@ -111,7 +111,7 @@ const getBookedEvents = async (req, res) => { res.status(200).json({ bookedEvents: customer.bookedEvents }); } catch (error) { - console.error(error); + logger.error("Error fetching event:", error); res.status(500).json({ message: "Server error" }); } };