From a23b52c600efc29badc28a7588f0f2c8a9ae2714 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Fri, 1 Mar 2019 19:57:30 -0800 Subject: [PATCH] First step of adding general ledger. --- src/clj/auto_ap/ledger.clj | 18 ++++++++++++++++++ src/cljs/auto_ap/effects.cljs | 3 +-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 src/clj/auto_ap/ledger.clj diff --git a/src/clj/auto_ap/ledger.clj b/src/clj/auto_ap/ledger.clj new file mode 100644 index 00000000..0d7d794c --- /dev/null +++ b/src/clj/auto_ap/ledger.clj @@ -0,0 +1,18 @@ +(ns auto-ap.ledger + (:require [datomic.api :as d] + [auto-ap.datomic :refer [uri]])) + +(defonce report-queue (d/tx-report-queue (d/connect uri) ) ) + +(let [transaction (.peek report-queue)] + (->> (:tx-data transaction) + (map (fn [x] + (.getY x) + (println id))) + )) + + + + + + diff --git a/src/cljs/auto_ap/effects.cljs b/src/cljs/auto_ap/effects.cljs index 27c90edf..3601dbc8 100644 --- a/src/cljs/auto_ap/effects.cljs +++ b/src/cljs/auto_ap/effects.cljs @@ -10,7 +10,6 @@ [clojure.walk :as walk] [venia.core :as v] [auto-ap.history :as p] - [auto-ap.events :as events] [pushy.core :as pushy])) (re-frame/reg-fx @@ -158,7 +157,7 @@ "&variables=" (pr-str (or variables {})))}))] (cond (= (:status response) 401) - (re-frame/dispatch [::events/logout "Your session has expired. Please log in again."]) + (re-frame/dispatch [:auto-ap.events/logout "Your session has expired. Please log in again."])