fix typo (#756)
This commit is contained in:
parent
d47d0f9619
commit
2c507d335d
1 changed files with 3 additions and 3 deletions
|
@ -114,7 +114,7 @@ function logger(format) {
|
||||||
const compose = require('koa-compose');
|
const compose = require('koa-compose');
|
||||||
|
|
||||||
async function random(ctx, next) {
|
async function random(ctx, next) {
|
||||||
if ('/random' == this.path) {
|
if ('/random' == ctx.path) {
|
||||||
ctx.body = Math.floor(Math.random() * 10);
|
ctx.body = Math.floor(Math.random() * 10);
|
||||||
} else {
|
} else {
|
||||||
await next();
|
await next();
|
||||||
|
@ -122,7 +122,7 @@ async function random(ctx, next) {
|
||||||
};
|
};
|
||||||
|
|
||||||
async function backwards(ctx, next) {
|
async function backwards(ctx, next) {
|
||||||
if ('/backwards' == this.path) {
|
if ('/backwards' == ctx.path) {
|
||||||
ctx.body = 'sdrawkcab';
|
ctx.body = 'sdrawkcab';
|
||||||
} else {
|
} else {
|
||||||
await next();
|
await next();
|
||||||
|
@ -130,7 +130,7 @@ async function backwards(ctx, next) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function pi(ctx, next) {
|
async function pi(ctx, next) {
|
||||||
if ('/pi' == this.path) {
|
if ('/pi' == ctx.path) {
|
||||||
ctx.body = String(Math.PI);
|
ctx.body = String(Math.PI);
|
||||||
} else {
|
} else {
|
||||||
await next();
|
await next();
|
||||||
|
|
Loading…
Reference in a new issue