diff --git a/server/controllers/auth.js b/server/controllers/auth.js index 86edb2d..f99c961 100644 --- a/server/controllers/auth.js +++ b/server/controllers/auth.js @@ -50,7 +50,6 @@ const googleLogin = async function (req, res) { ); }); } catch (error) { - // console.log(error); return res.status(400).json({ error: error }); } }; diff --git a/server/middlewares/error-handler.js b/server/middlewares/error-handler.js index d2bd0c5..e7c074e 100644 --- a/server/middlewares/error-handler.js +++ b/server/middlewares/error-handler.js @@ -1,12 +1,10 @@ -// Handling non-existing routes const unknownEndpoint = (req, res, next) => { res.status(404).send({ error: "Route not found" }); return next(); }; -// This overrides the default error handler to return a json response const defaultErrorHandler = (error, req, res) => { res.status(error.statusCode || 500).json({ status: error.status || "error",