import express from "express";
import isAuth from "../middleware/isAuth";

import * as PositionController from "../controllers/PositionController";

const positionRoutes = express.Router();

positionRoutes.get("/positions", isAuth, PositionController.index);

positionRoutes.get(
  "/positions/:positionId",
  isAuth,
  PositionController.show
);

positionRoutes.post("/positions", isAuth, PositionController.store);

positionRoutes.put(
  "/positions/:positionId",
  isAuth,
  PositionController.update
);

positionRoutes.delete(
  "/positions/:positionId",
  isAuth,
  PositionController.remove
);

export default positionRoutes;
