import { Router } from "express";

import isAuth from "../middleware/isAuth";
import * as UserController from "../controllers/UserController";

const userRoutes = Router();


userRoutes.get("/users/all", isAuth, UserController.all);

userRoutes.get("/users", isAuth, UserController.index); 

userRoutes.post("/users", isAuth, UserController.store); 

userRoutes.put("/users/:userId", isAuth, UserController.update);

userRoutes.get("/users/:userId", isAuth, UserController.show);

userRoutes.get("/users/logout/:userId", isAuth, UserController.logoutUser);

userRoutes.delete("/users/:userId", isAuth, UserController.remove);

export default userRoutes;
