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

let express = require("express");
let singleInfoRouter =express.Router();
import  SingleInfoController from "../controllers/single_info_controller";
let singleInfoController = new SingleInfoController();

module.exports =function (app){

    singleInfoRouter.get("/main", singleInfoController.auth, singleInfoController.init, singleInfoController.main);
    singleInfoRouter.post("/addLib", singleInfoController.auth, singleInfoController.init, singleInfoController.addLib);
    singleInfoRouter.post("/findLib", singleInfoController.auth, singleInfoController.init, singleInfoController.findLib);
    singleInfoRouter.post("/saveLib", singleInfoController.auth, singleInfoController.init, singleInfoController.saveLib);
    singleInfoRouter.post("/deleteLibByID", singleInfoController.auth, singleInfoController.init, singleInfoController.deleteLibByID);
    singleInfoRouter.get("/edit/:libID", singleInfoController.auth, singleInfoController.init, singleInfoController.edit);
    app.use("/singleInfo", singleInfoRouter);
};


