mirror of
https://github.com/metosin/reitit.git
synced 2025-12-17 00:11:11 +00:00
Merge pull request #110 from metosin/FrontendSmallChanges
Frontend small changes
This commit is contained in:
commit
1291ae0bcc
2 changed files with 4 additions and 12 deletions
|
|
@ -1,11 +1,8 @@
|
|||
(ns reitit.frontend
|
||||
""
|
||||
(:require [reitit.core :as reitit]
|
||||
[clojure.string :as str]
|
||||
[clojure.set :as set]
|
||||
[reitit.coercion :as coercion]
|
||||
[goog.events :as e]
|
||||
[goog.dom :as dom])
|
||||
[reitit.coercion :as coercion])
|
||||
(:import goog.Uri))
|
||||
|
||||
(defn query-params
|
||||
|
|
@ -26,12 +23,9 @@
|
|||
(let [q (query-params uri)
|
||||
;; Return uncoerced values if coercion is not enabled - so
|
||||
;; that tha parameters are always accessible from same property.
|
||||
;; FIXME: coerce! can't be used as it doesn't take query-params
|
||||
parameters (if (:result match)
|
||||
(coercion/coerce-request (:result match) {:query-params q
|
||||
:path-params (:path-params match)})
|
||||
{:query q
|
||||
:path (:path-params match)})]
|
||||
parameters (or (coercion/coerce! (assoc match :query-params q))
|
||||
{:path (:path-params match)
|
||||
:query q})]
|
||||
(assoc match :parameters parameters)))))
|
||||
|
||||
(defn match-by-name
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
(ns reitit.frontend.history
|
||||
""
|
||||
(:require [reitit.core :as reitit]
|
||||
[clojure.string :as string]
|
||||
[goog.events :as e]
|
||||
[goog.dom :as dom]
|
||||
[reitit.core :as r]
|
||||
[reitit.frontend :as rf]
|
||||
[reitit.impl :as impl])
|
||||
|
|
|
|||
Loading…
Reference in a new issue