Files
worldshine-redesign/app/routes/auth.routes.js
Lixian Zhou d17984fa51
Some checks failed
Build And Deploy Main / build-and-deploy (push) Has been cancelled
fix
2026-03-12 16:36:45 -04:00

13 lines
447 B
JavaScript

module.exports = app => {
const auth = require("../controllers/auth.controller");
const { authJwt } = require("../middlewares");
app.use(function(req, res, next) {
res.header(
"Access-Control-Allow-Headers",
"x-access-token, Origin, Content-Type, Accept"
);
next();
});
app.post('/api/auth/login', auth.login);
app.get('/api/auth/me', [authJwt.verifyToken], auth.me);
};