/**
 * Created by zhang on 2018/7/14.
 */
let express = require("express");
let colRouter =express.Router();
import MainColController from "../controllers/main_col_controller";
let mainColController = new MainColController();



module.exports =function (app) {

    colRouter.get("/main", mainColController.auth, mainColController.init, mainColController.main);
    colRouter.post("/add-lib", mainColController.auth, mainColController.init, mainColController.addLib);
    colRouter.post("/deleteLibByID", mainColController.auth, mainColController.init, mainColController.deleteLibByID);
    colRouter.post("/getLibByID", mainColController.auth, mainColController.init, mainColController.getLibByID);
    colRouter.post("/saveLib", mainColController.auth, mainColController.init, mainColController.saveLib);
    colRouter.get("/edit/:libID", mainColController.auth, mainColController.init, mainColController.edit);
    /*colRouter.get("/editTemplate/:libID", mainColController.auth, mainColController.init, mainColController.editTemplate);
    colRouter.post("/getLibByID", mainColController.auth, mainColController.init, mainColController.getLibByID);
    colRouter.post("/saveLib", mainColController.auth, mainColController.init, mainColController.saveLib);
    colRouter.post("/deleteLibByID", mainColController.auth, mainColController.init, mainColController.deleteLibByID);
    colRouter.post("/add-lib", mainColController.auth, mainColController.init, mainColController.addLib);
    colRouter.post("/updateBillsTemplateItem/:libID", mainColController.auth, mainColController.init, mainColController.updateBillsTemplateItem);*/
    app.use("/mainTreeCol", colRouter);
};