route.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. const express = require('express');
  2. const router = express.Router();
  3. const bodyParser = require('body-parser');
  4. const loginController = require("../controllers/loginController");
  5. const dvrController =require("../controllers/dvrReportController");
  6. const auth = require("../middlewares/authorize");
  7. router.use(bodyParser.urlencoded({ extended: true }))
  8. router.use(bodyParser.json());
  9. router.post("/api/changepassword", loginController.changepassword);
  10. router.post("/api/loginuser", loginController.loginUser);
  11. router.get("/api/getselectionData",auth,dvrController.getselectionData);
  12. router.post("/api/createContactEntry",auth,dvrController.createContactEntry);
  13. router.get("/api/getdvrdetails",auth,dvrController.getdvrDetails);
  14. router.get("/api/getdashboarddetails",auth,dvrController.getdashboarddetails);
  15. router.post("/api/createDvrEntry",auth,dvrController.createDvrEntry);
  16. router.put("/api/updateDvrEntry",auth,dvrController.updatedvrDetails);
  17. router.post("/api/userrolemap",auth ,loginController.userrolemap);
  18. router.post("/api/createCustomerEntry",auth,dvrController.createCustomerentry);
  19. router.put("/api/updateContactDetails",auth,dvrController.updateContactDetails);
  20. router.put("/api/updateCustomerDetails",auth,dvrController.updateCustomerDetails);
  21. router.get("/api/getlastestdvr",auth,dvrController.getlastestdvr);
  22. router.get("/api/getcontactdetails",auth,dvrController.getcontactDetails);
  23. router.get("/api/getsalepersonlist",auth,dvrController.getsalePersonList);
  24. router.get("/api/getcustcontactdetails",auth,dvrController.getCustcontactDetails);
  25. router.post("/api/createUpdateCustomerentry",auth,dvrController.createUpdateCustomerentry);
  26. router.post("/api/deletedvrEntry",auth,dvrController.deletedvrEntry);
  27. router.get("/api/mappingCustomerDetails",auth,dvrController.mappingCustomerDetails);
  28. router.get("/api/mappingFuncIDToPersonNames",auth,dvrController.mappingFuncIDToPersonNames);
  29. module.exports = router;