yield
=> await
(#798)
This commit is contained in:
parent
0d7aeb1f7c
commit
614b4e1ad7
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue