Closed handerpeder closed 11 months ago
use case: we want the default value to be current time.
previously you would have to do something like this:
(m/decode [:time/instant {:default :now}] nil (mt/default-value-transformer {:default-fn (fn [_ x ] (case x :now (java.time.Instant/now) x))}))
this patch lets you declare this without the indirection:
(m/decode [:time/instant {:default/fn #(java.time.Instant/now)}] nil mt/default-value-transformer)
Thanks!
use case: we want the default value to be current time.
previously you would have to do something like this:
this patch lets you declare this without the indirection: