Skip to content

Commit

Permalink
fixs
Browse files Browse the repository at this point in the history
  • Loading branch information
sandygudie committed Mar 22, 2024
1 parent f552b4a commit feda148
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion server/controllers/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const googleLogin = async function (req, res) {
);
});
} catch (error) {
// console.log(error);
return res.status(400).json({ error: error });
}
};
Expand Down
2 changes: 0 additions & 2 deletions server/middlewares/error-handler.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit feda148

Please sign in to comment.