api/resources/RetailDistributor/RetailDistributerRoutes.js
2024-09-09 16:49:29 +05:30

29 lines
603 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;