summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAsko Nõmm <asko@bien.ee>2021-10-03 13:01:48 -0300
committerAsko Nõmm <asko@bien.ee>2021-10-03 13:01:48 -0300
commitd7b656e884546d1b498db2b2a476df1254f978b4 (patch)
tree666a11198021207d676d576bfc35d7f63e156ffd /src
parente1b8f0969a4bd5f1e1e390364a55ffc6aa141d65 (diff)
Fix issue with regex parsing
Diffstat (limited to 'src')
-rw-r--r--src/ruuter/core.cljc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ruuter/core.cljc b/src/ruuter/core.cljc
index 0da46b6..8052d36 100644
--- a/src/ruuter/core.cljc
+++ b/src/ruuter/core.cljc
@@ -24,8 +24,7 @@
:else
; what comes around, goes around
%))
- (string/join "\\/")
- (re-pattern))))
+ (string/join "\\/"))))
(defn- path+uri->path-params
@@ -62,7 +61,7 @@
(let [route (->> routes
(filter #(not (= :not-found (:path %))))
(map #(merge % {:regex-path (path->regex-path (:path %))}))
- (filter #(and (re-matches (:regex-path %) uri)
+ (filter #(and (re-matches (re-pattern (:regex-path %)) uri)
(= (:method %) request-method)))
first)]
(when route