From a4542a88daafdb296e87d791e4ededd1293c2579 Mon Sep 17 00:00:00 2001 From: Werner Kok Date: Tue, 10 Dec 2024 11:45:55 +0000 Subject: [PATCH] Swapped flow execution order to consider custom interceptor changes (#36) --- src/hti/re_dash/alpha.cljd | 4 ++-- src/hti/re_dash/flows.cljd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hti/re_dash/alpha.cljd b/src/hti/re_dash/alpha.cljd index c06ce17..d20d4f9 100644 --- a/src/hti/re_dash/alpha.cljd +++ b/src/hti/re_dash/alpha.cljd @@ -466,9 +466,9 @@ all-interceptors (concat [do-fx-interceptor (prime-cofx-interceptor event-vec)] + [flows/flow-interceptor] @global-interceptors - interceptors - [flows/flow-interceptor])] + interceptors)] (when-not registered-event (throw (Exception. (str "Event not found: " event-id)))) diff --git a/src/hti/re_dash/flows.cljd b/src/hti/re_dash/flows.cljd index 73f4062..fb30393 100644 --- a/src/hti/re_dash/flows.cljd +++ b/src/hti/re_dash/flows.cljd @@ -121,6 +121,7 @@ (def flow-interceptor (interceptors/->interceptor :re-dash/flow + nil (fn [{{db :db} :effects :as context}] (let [old-db @app-db/app-db @@ -139,8 +140,7 @@ exec-flow-action) new-db))) (or db old-db) - sorted-ids)))) - nil)) + sorted-ids)))))) (defn sort-flow-ids