yield => await (#798)

This commit is contained in:
Ivan Lyons 2016-08-22 12:21:09 +08:00 committed by jongleberry
parent 0d7aeb1f7c
commit 614b4e1ad7

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