diff --git a/docs/api/request.md b/docs/api/request.md index 4738fbe..837fe3d 100644 --- a/docs/api/request.md +++ b/docs/api/request.md @@ -167,7 +167,7 @@ if (ctx.fresh) { // cache is stale // fetch new data -ctx.body = yield db.find('something'); +ctx.body = await db.find('something'); ``` ### request.stale diff --git a/docs/api/response.md b/docs/api/response.md index f66aa23..e224c7d 100644 --- a/docs/api/response.md +++ b/docs/api/response.md @@ -234,7 +234,7 @@ ctx.type = 'png'; const minify = require('html-minifier'); app.use(function * minifyHTML(next) { - yield next; + await next; if (!ctx.response.is('html')) return;