Skip to content
New issue

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

Nested query params #19

Open
rrrnld opened this issue Jul 9, 2018 · 1 comment
Open

Nested query params #19

rrrnld opened this issue Jul 9, 2018 · 1 comment

Comments

@rrrnld
Copy link
Contributor

rrrnld commented Jul 9, 2018

Hi!

I have a question about how to best approach this; I'm basically trying to encode redirection data into a route. I thought it would go like this:

;; construct the login route and try to reconstruct the original data
(r/resolve router ::login {} {:redirect [::artist-view {:id 1}]})
;; => "/?redirect=artist-view&redirect=%7B%3Aid%201%7D"
(r/match router *1)
;; => [:user/login nil {:redirect ["artist-view" "{:id 1}"]}]

As you can see the structure of the vector gets destroyed. Can I hook into the encoding somehow? Is there a better approach that I'm not seeing?

@jiangts
Copy link

jiangts commented Jan 29, 2019

+1. Nested query parameters failed for me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants