Skip to content

Commit

Permalink
docs(middleware): use app.middleware instead of app.middlewares (#2077)
Browse files Browse the repository at this point in the history
  • Loading branch information
x22x22 authored and atian25 committed Feb 2, 2018
1 parent 7e9f330 commit bbfacc5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/source/en/basics/middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ If you do want to take effect only for single route, you could just instantiate

```js
module.exports = app => {
const gzip = app.middlewares.gzip({ threshold: 1024 });
const gzip = app.middleware.gzip({ threshold: 1024 });
app.router.get('/needgzip', gzip, app.controller.handler);
};
```
Expand Down
2 changes: 1 addition & 1 deletion docs/source/zh-cn/basics/middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ module.exports = () => {

```js
module.exports = app => {
const gzip = app.middlewares.gzip({ threshold: 1024 });
const gzip = app.middleware.gzip({ threshold: 1024 });
app.router.get('/needgzip', gzip, app.controller.handler);
};
```
Expand Down

0 comments on commit bbfacc5

Please sign in to comment.