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

let express = require("express");
let engineerInfoRouter =express.Router();
import EngineerInfoController from "../controllers/engineer_info_controller";
let engineerInfoController = new EngineerInfoController();

module.exports =function (app) {

    engineerInfoRouter.get("/main", engineerInfoController.auth, engineerInfoController.init, engineerInfoController.main);
    engineerInfoRouter.post("/addLib", engineerInfoController.auth, engineerInfoController.init, engineerInfoController.addLib);
    engineerInfoRouter.post("/findLib", engineerInfoController.auth, engineerInfoController.init, engineerInfoController.findLib);
    engineerInfoRouter.post("/saveLib", engineerInfoController.auth, engineerInfoController.init, engineerInfoController.saveLib);
    engineerInfoRouter.post("/deleteLibByID", engineerInfoController.auth, engineerInfoController.init, engineerInfoController.deleteLibByID);
    engineerInfoRouter.get("/edit/:libID", engineerInfoController.auth, engineerInfoController.init, engineerInfoController.edit);


    app.use("/engineerInfo", engineerInfoRouter);
};