update doc example to use ctx.state

This commit is contained in:
Teoman Soygul 2015-04-16 15:43:45 +02:00
parent 4b83a5a96c
commit d5b73ebe4f

View file

@ -126,7 +126,7 @@ koa uses [http-errors](https://github.com/jshttp/http-errors) to create errors.
method. method.
```js ```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. koa uses [http-assert](https://github.com/jshttp/http-assert) for assertions.