Reputation: 1
I found a demo in the koa-router official docs.
router.get(
'/users/:id',
(ctx, next) => {
//something
},
async ctx => {
//I can't use await here
}
);
But why can't I use async and await in the second middleware? I always got Not found response by default.
Upvotes: 0
Views: 105