cleans up grids
This commit is contained in:
@@ -668,10 +668,7 @@
|
||||
(with-precision 2
|
||||
(double (.setScale (bigdec d) 2 java.math.RoundingMode/HALF_UP))))
|
||||
|
||||
(defn or-0 [x]
|
||||
(if (nil? x)
|
||||
0.0
|
||||
x))
|
||||
|
||||
|
||||
(defn wrap-implied-route-param [handler & {:as route-params}]
|
||||
(fn [request]
|
||||
@@ -701,4 +698,11 @@
|
||||
(= "A" location))
|
||||
|
||||
(throw (ex-info "Exception." {:type "'A' not allowed"})))
|
||||
true))
|
||||
true))
|
||||
|
||||
(def default-grid-fields-schema
|
||||
[
|
||||
[:sort {:optional true} [:maybe [:any]]]
|
||||
[:per-page {:optional true :default 25} [:maybe :int]]
|
||||
[:start {:optional true :default 0} [:maybe :int]]
|
||||
[:exact-match-id {:optional true} [:maybe entity-id]]])
|
||||
Reference in New Issue
Block a user