-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(quickstart): generator -> async #1650
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1650 +/- ##
=======================================
Coverage 99.57% 99.57%
=======================================
Files 29 29
Lines 712 712
=======================================
Hits 709 709
Misses 3 3 Continue to review full report at Codecov.
|
docs/source/en/intro/quickstart.md
Outdated
@@ -349,14 +352,14 @@ that checks the User-Agent. | |||
// app/middleware/robot.js | |||
// options === app.config.robot | |||
module.exports = (options, app) => { | |||
return function* robotMiddleware(next) { | |||
return async function robotMiddleware(next) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async function (ctx, next)
下面的 this 都要改成 ctx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -323,14 +327,14 @@ exports.relativeTime = time => moment(new Date(time * 1000)).fromNow(); | |||
// app/middleware/robot.js | |||
// options === app.config.robot | |||
module.exports = (options, app) => { | |||
return function* robotMiddleware(next) { | |||
return async function robotMiddleware(next) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
db21418
to
b1decfb
Compare
b1decfb
to
cb068e7
Compare
docs(quickstart): generator -> async (#1650)
Checklist
Affected core subsystem(s)
Description of change