change this to ctx in v2 signature example

This commit is contained in:
Tejas Manohar 2016-01-17 21:33:45 -08:00
parent bbfa6777a0
commit a03a7b3059

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
}) })
``` ```