docs: modified examples using the wrong keyword (yield -> await) (#1021)
This commit is contained in:
parent
aaac09af1a
commit
87cde82399
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue