api/resources/RetailDistributor/RetailDistributerRoutes.js
2024-09-10 11:02:35 +05:30

24 lines
594 B
JavaScript

import express from "express";
import {
ChangePasswordRD,
forgotPassword,
getmyProfile,
loginRD,
UpdateProfile,
} from "./RetailDistributorController.js";
import { isAuthenticatedRD } from "../../middlewares/rdAuth.js";
const router = express.Router();
router.route("/rd-login").post(loginRD);
router.route("/rd-get-me").get(isAuthenticatedRD, getmyProfile);
router.post("/forgot-password", forgotPassword);
router.put("/rd-password/update", isAuthenticatedRD, ChangePasswordRD);
router.patch(
"/rd-profile/update",
isAuthenticatedRD,
UpdateProfile
);
export default router;