import { Router } from "express";
import { LPGController } from "./lpg.controller";
import { authMiddleware } from "../auth/auth.middleware";

const lpgRouter = Router();

const controller = new LPGController();


//Obtener todas las requisiciones
lpgRouter.get("/", authMiddleware, controller.getAll);

//Obtener requisición por ID
lpgRouter.get("/:id", authMiddleware, controller.getById);


//Crear requisición
lpgRouter.post( "/", authMiddleware, controller.create);


//Actualizar requisición
lpgRouter.put("/:id", authMiddleware, controller.update);

//Eliminar requisició
lpgRouter.delete("/:id", authMiddleware, controller.delete);

export default lpgRouter;