structural_segment_routes.js 1.3 KB

123456789101112131415161718192021
  1. /**
  2. * Created by zhang on 2018/9/3.
  3. */
  4. let express = require("express");
  5. let structuralSegmentRouter =express.Router();
  6. import StructuralSegmentController from "../controllers/structural_segment_controller";
  7. let structuralSegmentController = new StructuralSegmentController();
  8. module.exports =function (app){
  9. structuralSegmentRouter.get("/main", structuralSegmentController.auth, structuralSegmentController.init, structuralSegmentController.main);
  10. structuralSegmentRouter.post("/addLib", structuralSegmentController.auth, structuralSegmentController.init, structuralSegmentController.addLib);
  11. structuralSegmentRouter.post("/findLib", structuralSegmentController.auth, structuralSegmentController.init, structuralSegmentController.findLib);
  12. structuralSegmentRouter.post("/saveLib", structuralSegmentController.auth, structuralSegmentController.init, structuralSegmentController.saveLib);
  13. structuralSegmentRouter.post("/deleteLibByID", structuralSegmentController.auth, structuralSegmentController.init, structuralSegmentController.deleteLibByID);
  14. structuralSegmentRouter.get("/edit/:libID", structuralSegmentController.auth, structuralSegmentController.init, structuralSegmentController.edit);
  15. app.use("/structuralSegment", structuralSegmentRouter);
  16. };