Skip to content

Commit

Permalink
handler-interceptor passes (:input env) directly to handler-fn
Browse files Browse the repository at this point in the history
  • Loading branch information
Quantisan committed Jun 10, 2021
1 parent 39271cc commit 1f92b0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/stepwise/activities.clj
Expand Up @@ -45,10 +45,10 @@

(defn make-handler-interceptor [handler-fn]
[:handler
{:before (fn [env]
(assoc env :output (handler-fn (select-keys env [:context :input]))))}])
{:before (fn [{input :input :as env}]
(assoc env :output (handler-fn input)))}])

(defn identity-handler-fn [{:keys [input]}] input)
(defn identity-handler-fn [input] input)

(defn compile [handler]
(if (fn? handler)
Expand Down

0 comments on commit 1f92b0c

Please sign in to comment.