docs: add the missing next param (#942)
This commit is contained in:
parent
9a9949f9ee
commit
682d7b484a
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ app.use(convert(function *(next) {
|
||||||
You will have to convert your generators to async functions with the new middleware signature:
|
You will have to convert your generators to async functions with the new middleware signature:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
app.use(async ctx => {
|
app.use(async (ctx, next) => {
|
||||||
const user = await Users.getById(this.session.user_id);
|
const user = await Users.getById(this.session.user_id);
|
||||||
await next();
|
await next();
|
||||||
ctx.body = { message: 'some message' };
|
ctx.body = { message: 'some message' };
|
||||||
|
|
Loading…
Reference in a new issue