mirror of
https://github.com/metosin/reitit.git
synced 2025-12-18 08:51:12 +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
|
(ns reitit.frontend
|
||||||
""
|
""
|
||||||
(:require [reitit.core :as reitit]
|
(:require [reitit.core :as reitit]
|
||||||
[clojure.string :as str]
|
|
||||||
[clojure.set :as set]
|
[clojure.set :as set]
|
||||||
[reitit.coercion :as coercion]
|
[reitit.coercion :as coercion])
|
||||||
[goog.events :as e]
|
|
||||||
[goog.dom :as dom])
|
|
||||||
(:import goog.Uri))
|
(:import goog.Uri))
|
||||||
|
|
||||||
(defn query-params
|
(defn query-params
|
||||||
|
|
@ -26,12 +23,9 @@
|
||||||
(let [q (query-params uri)
|
(let [q (query-params uri)
|
||||||
;; Return uncoerced values if coercion is not enabled - so
|
;; Return uncoerced values if coercion is not enabled - so
|
||||||
;; that tha parameters are always accessible from same property.
|
;; that tha parameters are always accessible from same property.
|
||||||
;; FIXME: coerce! can't be used as it doesn't take query-params
|
parameters (or (coercion/coerce! (assoc match :query-params q))
|
||||||
parameters (if (:result match)
|
{:path (:path-params match)
|
||||||
(coercion/coerce-request (:result match) {:query-params q
|
:query q})]
|
||||||
:path-params (:path-params match)})
|
|
||||||
{:query q
|
|
||||||
:path (:path-params match)})]
|
|
||||||
(assoc match :parameters parameters)))))
|
(assoc match :parameters parameters)))))
|
||||||
|
|
||||||
(defn match-by-name
|
(defn match-by-name
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
(ns reitit.frontend.history
|
(ns reitit.frontend.history
|
||||||
""
|
""
|
||||||
(:require [reitit.core :as reitit]
|
(:require [reitit.core :as reitit]
|
||||||
[clojure.string :as string]
|
|
||||||
[goog.events :as e]
|
[goog.events :as e]
|
||||||
[goog.dom :as dom]
|
|
||||||
[reitit.core :as r]
|
[reitit.core :as r]
|
||||||
[reitit.frontend :as rf]
|
[reitit.frontend :as rf]
|
||||||
[reitit.impl :as impl])
|
[reitit.impl :as impl])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue