24 lines
672 B
TypeScript
24 lines
672 B
TypeScript
|
import { Router } from "express";
|
||
|
|
||
|
import isAuth from "../middleware/isAuth";
|
||
|
import * as IAMControllerEL from "../controllers/IAMControllerEL";
|
||
|
|
||
|
const iamRoutesEL = Router();
|
||
|
|
||
|
|
||
|
iamRoutesEL.get("/users/all", isAuth, IAMControllerEL.all);
|
||
|
|
||
|
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);
|
||
|
|
||
|
export default iamRoutesEL;
|