mirror of https://gitee.com/bigwinds/arangodb
543 B
543 B
Controller.allRoutes.pathParam(id, options)
This is equal to invoking Route.pathParam
on all routes bound to this controller.
Examples
app.allRoutes.pathParam("id", joi.string().required().description("Id of the Foxx"));
app.get("/foxx/:id", function {
// Secured by pathParam
});
You can also pass in a configuration object instead:
app.allRoutes.pathParam("id", {
type: joi.string(),
required: true,
description: "Id of the Foxx"
});
app.get("/foxx/:id", function {
// Secured by pathParam
});