import express from "express"; import { AddPrivacyAndPolicy, AddShipping, AddTermsAndConditions, RefundPolicy, getPrivacyPolicy, getRefundPolicy, getShipping, getTermsAndCondition, updatePrivacyPolicy, updateShipping, updateTermsAndConditions, updateRefundPolicy, AddAboutUs, getAboutUs, updateAboutUs } from "./ContentController.js"; import { isAuthenticatedUser, authorizeRoles } from "../../middlewares/auth.js"; const router = express.Router(); router .route("/terms-and-conditions") .post(isAuthenticatedUser, authorizeRoles("admin"), AddTermsAndConditions); router.route("/terms-and-conditions").get(getTermsAndCondition); router .route("/terms-and-condition-update") .patch( isAuthenticatedUser, authorizeRoles("admin"), updateTermsAndConditions ); router .route("/privacy-and-policy") .post(isAuthenticatedUser, authorizeRoles("admin"), AddPrivacyAndPolicy); router.route("/privacy-and-policy").get(getPrivacyPolicy); router .route("/privacy-and-policy-update") .patch(isAuthenticatedUser, authorizeRoles("admin"), updatePrivacyPolicy); router .route("/shipping-and-policy") .post(isAuthenticatedUser, authorizeRoles("admin"), AddShipping); router.route("/shipping-and-policy").get(getShipping); router .route("/shipping-and-policy-update") .patch(isAuthenticatedUser, authorizeRoles("admin"), updateShipping); //refund Policy router.route("/refund-policy").get(getRefundPolicy); router .route("/refund-policy") .post(isAuthenticatedUser, authorizeRoles("admin"), RefundPolicy); router .route("/refund-policy-update") .patch(isAuthenticatedUser, authorizeRoles("admin"), updateRefundPolicy); //about us router .route("/about-us") .post(isAuthenticatedUser, authorizeRoles("admin"), AddAboutUs); router.route("/about-us").get(getAboutUs); router .route("/about-us-update") .patch(isAuthenticatedUser, authorizeRoles("admin"), updateAboutUs); export default router;