docs: modified examples using the wrong keyword (yield -> await) (#1021)

master
Chiahao Lin 2017-07-07 15:48:31 +08:00 committed by jongleberry
parent aaac09af1a
commit 87cde82399
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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;