Skip to content

Commit

Permalink
Removed auth in sign out
Browse files Browse the repository at this point in the history
  • Loading branch information
ab-elhaddad committed Nov 14, 2023
1 parent 22cf47d commit b68290d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/routes/api/userRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,36 @@ import authenticate from '../../middlewares/authenticate.middleware';
import Validator from '../../middlewares/validators/validator';

const userRouter = (app: Application) => {
app.route('/users/sign-in')
app
.route('/users/sign-in')
.get(signIn.get)
.post(Validator.users.signIn, signIn.post)
.all(errorHandler);

app.route('/users/sign-up')
app
.route('/users/sign-up')
.get(signUp.get)
.post(Validator.users.signUp, signUp.post)
.all(errorHandler);

app.route('/users/sign-out')
.all(authenticate)
.get(signOut)
.all(errorHandler);
app.route('/users/sign-out').get(signOut).all(errorHandler);

app.route('/users/forgot-password')
app
.route('/users/forgot-password')
.get(forgotPassword.get)
.post(Validator.users.forgotPassword, forgotPassword.post)
.all(errorHandler);

app.route('/users/reset-password/:token')
app
.route('/users/reset-password/:token')
.get(resetPassword.get)
.post(Validator.users.resetPassword, resetPassword.post)
.all(errorHandler);

app.route('/confirm/:token')
.get(Validator.users.confirm, confirm)
.all(errorHandler);
app.route('/confirm/:token').get(Validator.users.confirm, confirm).all(errorHandler);

app.route('/users/profile')
app
.route('/users/profile')
.all(authenticate)
.get(profile)
.put(Validator.users.update, updateUser)
Expand Down

0 comments on commit b68290d

Please sign in to comment.