Skip to content

incorrect category routes in hackernews_islands_axum example #3892

Open
@nickburlett

Description

@nickburlett

edit: add description of related route-matching issue

Describe the bug

  1. In examples/hackernews_islands_axum, the category function is called twice, leading to incorrect article listings for "new" and "job" (both end up with the "news" catch-all).

  2. Additionally, if the path doesn't get matched by the router and does not exist as a fallback static file, the server panics.

Leptos Dependencies

Reproduces from tag 0.8.0-rc3 with example https://github.com/leptos-rs/leptos/tree/main/examples/hackernews_islands_axum

To Reproduce

git clone https://github.com/leptos-rs/leptos.git
cd leptos/examples/hackernews_islands_axum
cargo leptos watch
  1. Visit http://localhost:8080/ and http://localhost:8080/jobs in the browser and notice they're the same.
  2. Visit http://localhost:8080/explode/panic or http://localhost:8080/stories/ and see no data returned and a server panic

Next Steps

[X] I will make a PR
[ ] I would like to make a PR, but need help getting started
[ ] I want someone else to take the time to fix this
[ ] This is a low priority for me and is just shared for your information

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions