var express = require("express")
var controller = require("../../controllers/book")
var page = require("./page.js")
var router = express.Router()
var param = express.Router()
router.route("/")
.get(controller.list)
.post(controller.post)
router.param("name", controller.init)
param.use("/pages", page)
param.route("/")
.get(controller.get)
.delete(controller.delete)
router.use("/:name", param)
module.exports = router