Open joshbenaron opened 2 years ago
node.js version: 16.8
@koa/router version: 10.1.1
@koa/router
koa version: 2.13.1
koa
export const router = new Router() .get("/ping", ping) .get("/public", getPublic) .get("/account/balance", getUserBalance) .get("/peers", getPeers) .get("/peers/random/:count", getRandomPeers) .post("/tx", postTxRateLimiter, initialChecks, fileUpload, verifyUpload, sendSignedResponse) .head("/:txId", getTx) .get("/:txId", getTx) // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore .post("/newTx", rateLimiter, jsonBodyParser, newTx);
When I go to GET /ping - I should see a specific output
GET /ping
GET /ping is going to GET /:txId
GET /:txId
Do you have a next() on your /ping middleware? If you don't want any other routes to be executed, you should remove it.
next()
/ping
@joshbenaron would you consider this resolved? :)
node.js version: 16.8
@koa/router
version: 10.1.1koa
version: 2.13.1Code sample:
Expected Behavior:
When I go to
GET /ping
- I should see a specific outputActual Behavior:
GET /ping
is going toGET /:txId