Merge pull request #641 from tejasmanohar/fix-this-v2-example

change `this` to `ctx` in v2 signature example
This commit is contained in:
jongleberry 2016-01-17 21:43:53 -08:00
commit 1f403cde74

View file

@ -36,7 +36,7 @@ app.use(async (ctx, next) => {
}) })
app.use(async ctx => { app.use(async ctx => {
const user = await User.getById(this.session.userid) // await instead of yield const user = await User.getById(ctx.session.userid) // await instead of yield
ctx.body = user // ctx instead of this ctx.body = user // ctx instead of this
}) })
``` ```