Skip to content

Commit

Permalink
[FIX]: erro de autenticação
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaryoshida committed Nov 22, 2023
1 parent 9ebdd53 commit 00a9396
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/controllers/middlewares/Auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const createToken = (user) => {

const validateToken = (req, res, next) => {

if (req.path === '/register' && req.method === 'POST') {
if (req.path === '/auth/register' && req.method === 'POST') {
return next();
}

Expand Down
2 changes: 1 addition & 1 deletion backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const port = 3001;
app.use(express.json());
app.use(validateToken);

app.use(userRoute);
app.use('/auth', userRoute);
app.use('/elective', electiveRoute);
app.use('/learning_paths', learningPathRoute);

Expand Down

0 comments on commit 00a9396

Please sign in to comment.