Merge pull request #436 from soygul/patch-1

Update doc example to use ctx.state
master
Yiyu He 2015-04-24 01:13:00 +08:00
commit 34c36d05c3
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ koa uses [http-errors](https://github.com/jshttp/http-errors) to create errors.
method.
```js
this.assert(this.user, 401, 'User not found. Please login!');
this.assert(this.state.user, 401, 'User not found. Please login!');
```
koa uses [http-assert](https://github.com/jshttp/http-assert) for assertions.