`yield` => `await` (#798)

master
Ivan Lyons 2016-08-22 12:21:09 +08:00 committed by jongleberry
parent 0d7aeb1f7c
commit 614b4e1ad7
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ app.use(async (ctx, next) => {
The recommended namespace for passing information through middleware and to your frontend views.
```js
ctx.state.user = yield User.find(id);
ctx.state.user = await User.find(id);
```
### ctx.app