Some checks failed
Build And Deploy Main / build-and-deploy (push) Has been cancelled
13 lines
447 B
JavaScript
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);
|
|
}; |