import express from "express"; import { getProductsWithStockInfo, getProductsWithOpenInventoryInfo, DownloadProductsWithOpenInventoryInfo, DownloadProductsWithStockInfo, } from "./OpeningInventoryReports.js"; import { isAuthenticatedUser, authorizeRoles } from "../../middlewares/auth.js"; const router = express.Router(); router .route("/opening-inventory") .get( isAuthenticatedUser, authorizeRoles("admin"), getProductsWithOpenInventoryInfo ); router .route("/opening-inventory/download") .get( isAuthenticatedUser, authorizeRoles("admin"), DownloadProductsWithOpenInventoryInfo ); router .route("/stock/download") .get( isAuthenticatedUser, authorizeRoles("admin"), DownloadProductsWithStockInfo ); router .route("/stock") .get(isAuthenticatedUser, authorizeRoles("admin"), getProductsWithStockInfo); export default router;