We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
context.params
import { Application, Router } from "https://deno.land/x/oak/mod.ts"; const posts = new Router() .use(async (ctx, next) => { console.log(ctx.params); // {} await next(); }) .get("/", (ctx) => { console.log(ctx.params); // {forumId: string} }); const forums = new Router() .use("/forums/:forumId/posts", posts.routes(), posts.allowedMethods()); await new Application() .use(forums.routes()) .listen({ port: 8000 });
ctx.params
forumId
The text was updated successfully, but these errors were encountered:
No branches or pull requests
For example some slight modifications for the example in the README
Actual Behaviour
ctx.params
from the middleware it is an empty object. Since it is available at all I would expect the params to exist.Expected Behaviour
ctx.params
from the middleware it has an object containing theforumId
property. This is different than thectx.params
in the routes.Details
forumId
across the nested routes.The text was updated successfully, but these errors were encountered: