Skip to content

Commit

Permalink
Add users route getAllUsers controller and update auth reset password…
Browse files Browse the repository at this point in the history
… to a PUT method
  • Loading branch information
n1klaus committed Apr 27, 2023
1 parent 54abf58 commit e416581
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/routes/auth.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ router.post("/login", validate(loginUserModel), AuthController.loginHandler); //
router.get("/logout", getAuthToken, requireLogin, AuthController.logoutHandler); // GET /auth/logout

// Reset user password route
router.post("/reset-password", validate(resetPasswordModel), AuthController.resetPasswordHandler); // POST /auth/reset-password
router.put("/reset-password", validate(resetPasswordModel), AuthController.resetPasswordHandler); // PUT /auth/reset-password

export default router;
3 changes: 3 additions & 0 deletions backend/src/routes/user.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const router = express.Router();

// router.use(getAuthToken, requireLogin);

// Get all users
router.get("/", getAuthToken, requireLogin, UserController.getAllUsers); // GET /users

// Get my profile route
router.get("/me", getAuthToken, requireLogin, UserController.getMeHandler); // GET /users/me

Expand Down

0 comments on commit e416581

Please sign in to comment.