reitit

shane 2024-09-26T16:38:17.354919Z

👋 hello - is there an exposed function that can build a path out of a template and path-params? I basically just need the url builder part not the full router but I can't figure out a better way than this:

(-> [(:template rq) :x]
    (r/router)
    (r/match-by-name :x (:path-params rq))
    :path)

shane 2024-09-27T13:17:18.756439Z

thanks but that still needs a router. I was hoping there was some internal function that could convert a template plus path-params into a full path directly. but I guess its not too terrible to build a single route router each time just seems like over kill.

valerauko 2024-09-27T13:55:03.368259Z

I have a Link protocol that i then extend in the router's namespace and have it close over the router for ease of use (and avoid circular dependencies)