mirror of
https://github.com/metosin/reitit.git
synced 2025-12-18 17:01:11 +00:00
Fix reference -- from r to router
This commit is contained in:
parent
e5c4ae533f
commit
3766a5929e
1 changed files with 3 additions and 3 deletions
|
|
@ -15,7 +15,7 @@ By default, all wildcard and catch-all parameters are parsed into strings:
|
||||||
Match with the parsed `:path-params` as strings:
|
Match with the parsed `:path-params` as strings:
|
||||||
|
|
||||||
```clj
|
```clj
|
||||||
(r/match-by-path r "/metosin/users/123")
|
(r/match-by-path router "/metosin/users/123")
|
||||||
; #Match{:template "/:company/users/:user-id",
|
; #Match{:template "/:company/users/:user-id",
|
||||||
; :data {:name :user/user-view},
|
; :data {:name :user/user-view},
|
||||||
; :result nil,
|
; :result nil,
|
||||||
|
|
@ -63,7 +63,7 @@ Example with Schema path-parameters:
|
||||||
A Match:
|
A Match:
|
||||||
|
|
||||||
```clj
|
```clj
|
||||||
(r/match-by-path r "/metosin/users/123")
|
(r/match-by-path router "/metosin/users/123")
|
||||||
; #Match{:template "/:company/users/:user-id",
|
; #Match{:template "/:company/users/:user-id",
|
||||||
; :data {:name :user/user-view,
|
; :data {:name :user/user-view,
|
||||||
; :coercion <<:schema>>
|
; :coercion <<:schema>>
|
||||||
|
|
@ -103,7 +103,7 @@ There is a helper function `reitit.coercion/compile-request-coercers` just for t
|
||||||
Routing again:
|
Routing again:
|
||||||
|
|
||||||
```clj
|
```clj
|
||||||
(r/match-by-path r "/metosin/users/123")
|
(r/match-by-path router "/metosin/users/123")
|
||||||
; #Match{:template "/:company/users/:user-id",
|
; #Match{:template "/:company/users/:user-id",
|
||||||
; :data {:name :user/user-view,
|
; :data {:name :user/user-view,
|
||||||
; :coercion <<:schema>>
|
; :coercion <<:schema>>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue