performance improvement on proxy service
This commit is contained in:
parent
eadf769ab3
commit
82f0ee709f
2 changed files with 51 additions and 39 deletions
|
|
@ -60,29 +60,6 @@ auth.get("/current_user", (req, res) => {
|
|||
}
|
||||
});
|
||||
|
||||
// router.get("/google/login", (req, res) => {
|
||||
// if (req.user) {
|
||||
// console.log(`${process.env.DB_USER_SERVICE_URL}instructor/register-user`);
|
||||
// axios
|
||||
// .post(`${process.env.DB_USER_SERVICE_URL}instructor/register-user`, {
|
||||
// user: req.user,
|
||||
// })
|
||||
// .then((response) => {
|
||||
// req.user.userId = response.data.user.userid;
|
||||
// console.log("User ID:", response.data.user.userid);
|
||||
// req.user.role = "instructor";
|
||||
// console.log("User registration response:", response.data);
|
||||
// res.redirect(process.env.LOGIN_REDIRECT_URL);
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// console.error("Error registering user:", error.message);
|
||||
// res.status(500).json({ error: true, message: "User login failed" });
|
||||
// });
|
||||
// } else {
|
||||
// res.status(403).json({ error: true, message: "Not Authorized" });
|
||||
// }
|
||||
// });
|
||||
|
||||
auth.get("/login/failed", (req, res) => {
|
||||
res.status(401).json({
|
||||
error: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue