37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
import express from "express";
|
|
import { isAuthenticatedSalesCoOrdinator } from "../../middlewares/SalesCoOrdinatorAuth.js";
|
|
import {
|
|
getNotification,
|
|
getNotificationByDates,
|
|
} from "./notificationController.js";
|
|
import { isAuthenticatedTerritoryManager } from "../../middlewares/TerritoryManagerAuth.js";
|
|
import { isAuthenticatedUser } from "../../middlewares/auth.js";
|
|
import { isAuthenticatedRD } from "../../middlewares/rdAuth.js";
|
|
|
|
const router = express.Router();
|
|
|
|
router
|
|
.route("/get-notification-sc")
|
|
.get(isAuthenticatedSalesCoOrdinator, getNotificationByDates);
|
|
|
|
router
|
|
.route("/get-notification-sc/:id")
|
|
.get(isAuthenticatedSalesCoOrdinator, getNotification);
|
|
|
|
router
|
|
.route("/get-notification-tm")
|
|
.get(isAuthenticatedTerritoryManager, getNotificationByDates);
|
|
|
|
router
|
|
.route("/get-notification-tm/:id")
|
|
.get(isAuthenticatedTerritoryManager, getNotification);
|
|
|
|
router
|
|
.route("/get-notification-pd")
|
|
.get(isAuthenticatedUser, getNotificationByDates);
|
|
router
|
|
.route("/get-notification-rd")
|
|
.get(isAuthenticatedRD, getNotificationByDates);
|
|
|
|
export default router;
|