'use strict';

/**
 *
 *
 * @author Zhong
 * @date 2019/1/25
 * @version
 */

let express = require("express");
let progressiveRouter =express.Router();
import ProgressiveController from "../controllers/progressive_controller";
let progressiveController = new ProgressiveController();

module.exports =function (app){

    progressiveRouter.get("/main", progressiveController.auth, progressiveController.init, progressiveController.main);
    progressiveRouter.post("/addLib", progressiveController.auth, progressiveController.init, progressiveController.addLib);
    progressiveRouter.post("/findLib", progressiveController.auth, progressiveController.init, progressiveController.findLib);
    progressiveRouter.post("/saveLib", progressiveController.auth, progressiveController.init, progressiveController.saveLib);
    progressiveRouter.post("/deleteLibByID", progressiveController.auth, progressiveController.init, progressiveController.deleteLibByID);
    progressiveRouter.get("/edit/:libID", progressiveController.auth, progressiveController.init, progressiveController.edit);
    app.use("/progressive", progressiveRouter);
};

