api/resources/Informations/InformationRoute.js
2024-05-03 10:31:21 +05:30

28 lines
598 B
JavaScript

import express from "express";
import { isAuthenticatedUser, authorizeRoles } from "../../middlewares/auth.js";
import {
AddNewnIformation,
FindAllInformation,
} from "./InformationController.js";
const router = express.Router();
router
.route("/new")
.post(
isAuthenticatedUser,
authorizeRoles("admin", "Employee"),
AddNewnIformation
);
router
.route("/getAll")
.get(
isAuthenticatedUser,
authorizeRoles("admin", "Employee"),
FindAllInformation
);
// router.route("/product/getAll/").get(getAllProduct)
export default router;