From c11da04e134fdd7fdf6c1564a8669c028ef50fe1 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 22 Jul 2025 12:27:17 -0700 Subject: [PATCH] add edit user routes --- server/routes/authRoute.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/routes/authRoute.js b/server/routes/authRoute.js index 6d8af52f8..e790c60b0 100755 --- a/server/routes/authRoute.js +++ b/server/routes/authRoute.js @@ -25,6 +25,8 @@ class AuthRoutes { this.router.get("/users/superadmin", this.authController.checkSuperadminExists); this.router.get("/users", verifyJWT, isAllowed(["admin", "superadmin"]), this.authController.getAllUsers); + this.router.get("/users/:userId", verifyJWT, isAllowed(["superadmin"]), this.authController.getUserById); + this.router.put("/users/:userId", verifyJWT, isAllowed(["superadmin"]), this.authController.editUserById); this.router.put("/user", verifyJWT, upload.single("profileImage"), this.authController.editUser); this.router.delete("/user", verifyJWT, this.authController.deleteUser);