/**
 * Created by zhang on 2018/9/3.
 */

let express = require("express");
let structuralSegmentRouter =express.Router();
import  StructuralSegmentController from "../controllers/structural_segment_controller";
let structuralSegmentController = new StructuralSegmentController();

module.exports =function (app){

    structuralSegmentRouter.get("/main", structuralSegmentController.auth, structuralSegmentController.init, structuralSegmentController.main);
    structuralSegmentRouter.post("/addLib", structuralSegmentController.auth, structuralSegmentController.init, structuralSegmentController.addLib);
    structuralSegmentRouter.post("/findLib", structuralSegmentController.auth, structuralSegmentController.init, structuralSegmentController.findLib);
    structuralSegmentRouter.post("/saveLib", structuralSegmentController.auth, structuralSegmentController.init, structuralSegmentController.saveLib);
    structuralSegmentRouter.post("/deleteLibByID", structuralSegmentController.auth, structuralSegmentController.init, structuralSegmentController.deleteLibByID);
    structuralSegmentRouter.get("/edit/:libID", structuralSegmentController.auth, structuralSegmentController.init, structuralSegmentController.edit);
    app.use("/structuralSegment", structuralSegmentRouter);
};


