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

let express = require("express");
let quantityRouter =express.Router();
import QuantityController from "../controllers/quantity_controller";
let quantityController = new QuantityController();

module.exports =function (app) {

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


    app.use("/mainQuantity", quantityRouter);
};