mirror of https://gitee.com/bigwinds/arangodb
18 lines
307 B
Markdown
18 lines
307 B
Markdown
|
|
|
|
|
|
`Controller.allRoutes.onlyIfAuthenticated(code, description)`
|
|
|
|
This is equal to invoking `Route.onlyIfAuthenticated` on all routes bound to this controller.
|
|
|
|
*Examples*
|
|
|
|
```js
|
|
app.allRoutes.onlyIfAuthenticated(401, "You need to be authenticated");
|
|
|
|
app.get("/foxx", function {
|
|
// Do something
|
|
});
|
|
```
|
|
|