feat: Add API routes for integrating Horacius users with Omnihit

feat-scaling-ticket-remote-creation
Henrriky 2024-03-12 17:18:22 -03:00
parent 2f56673962
commit d608538c9e
1 changed files with 9 additions and 13 deletions

View File

@ -1,23 +1,19 @@
import { Router } from "express";
import isAuth from "../middleware/isAuth";
import * as IAMControllerEL from "../controllers/IAMControllerEL";
import verifyAPIKey from "../middleware/verifyAPIKey";
const iamRoutesEL = Router();
iamRoutesEL.post("/IAM/users", verifyAPIKey, IAMControllerEL.createUser);
iamRoutesEL.put("/IAM/users", verifyAPIKey, IAMControllerEL.updateUser);
iamRoutesEL.delete("/IAM/users", verifyAPIKey, IAMControllerEL.deleteUser);
iamRoutesEL.get("/IAM/users/check", verifyAPIKey, IAMControllerEL.checkUser);
iamRoutesEL.get("/users/all", isAuth, IAMControllerEL.all);
iamRoutesEL.patch("/IAM/users/rights/link", verifyAPIKey, IAMControllerEL.linkUserRight);
iamRoutesEL.patch("/IAM/users/rights/unlink", verifyAPIKey, IAMControllerEL.unlinkUserRight);
iamRoutesEL.post("/IAM/users/rights/check", verifyAPIKey, IAMControllerEL.checkUserRight);
iamRoutesEL.get("/users", isAuth, IAMControllerEL.index);
iamRoutesEL.post("/users", isAuth, IAMControllerEL.store);
iamRoutesEL.put("/users/:userId", isAuth, IAMControllerEL.update);
iamRoutesEL.get("/users/:userId", isAuth, IAMControllerEL.show);
iamRoutesEL.get("/users/logout/:userId", isAuth, IAMControllerEL.logoutUser);
iamRoutesEL.delete("/users/:userId", isAuth, IAMControllerEL.remove);
iamRoutesEL.patch("/IAM/users/reset-password", verifyAPIKey, IAMControllerEL.resetPassword);
export default iamRoutesEL;