Commit b92a10cd authored by pdg16's avatar pdg16
Browse files

clean code and add res info

parent 74a2772c
Pipeline #21777 failed with stage
in 1 minute and 50 seconds
......@@ -40,14 +40,9 @@ const checkOrigin = require(`${libs}/middlewares/authOrigin`);
verifyDownload.get('/', passport.authenticate('bearer', { session: false }), checkOrigin, (req, res) => {
console.log(req.user.origin === req.headers.origin);
if(req.user.origin === req.headers.origin) {
return res.json({access: "Authorized", name:, email:, userId: req.user._id, adminSimcaqNode: req.user.adminSimcaqNode});
return res.json({access: "Authorized", name:, email:, userId: req.user._id, origin: req.user.origin, adminSimcaqNode: req.user.adminSimcaqNode, adminLDE: req.user.adminLDE });
console.log("NÃO AUTORIZADO");
return res.json({access: "Unauthorized"});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment