everything is audited.
This commit is contained in:
@@ -789,13 +789,14 @@
|
||||
(:sort args)))
|
||||
|
||||
(defn apply-sort-3 [args results]
|
||||
|
||||
(let [sort-bys (conj (:sort args)
|
||||
{:sort-key "default" :asc true})
|
||||
length (count sort-bys)
|
||||
comparator (fn [xs ys]
|
||||
(reduce
|
||||
(fn [_ i]
|
||||
(let [comparison (if (:asc (sort-bys i))
|
||||
(let [comparison (if (:asc (nth sort-bys i))
|
||||
(compare (nth xs i) (nth ys i))
|
||||
(compare (nth ys i) (nth xs i)))]
|
||||
|
||||
@@ -819,9 +820,10 @@
|
||||
(let [batch-id (.toString (java.util.UUID/randomUUID))]
|
||||
(reduce
|
||||
(fn [full-tx batch]
|
||||
(let [batch (conj batch {:db/id "datomic.tx"
|
||||
(let [batch (conj (vec batch) {:db/id "datomic.tx"
|
||||
:audit/user (str (:user/role id) "-" (:user/name id))
|
||||
:audit/batch batch-id})
|
||||
_ (log/info "transacting batch " batch-id " " (count batch))
|
||||
tx-result @(d/transact conn batch)]
|
||||
|
||||
(cond-> full-tx
|
||||
|
||||
Reference in New Issue
Block a user