sieppari
sieppari copied to clipboard
Consider including `with-bindings` support
Adding support for appears to be straight-forward:
https://github.com/metosin/sieppari/commit/bd54b969368df7945e175457ad8646cb93c8daa4
All one has to do is set :bindings on the context within any :enter interceptor:
(def ^:dynamic *transacting-user-id* nil)
(defn transacting-user-interceptor []
{:name ::transacting-user
:enter (fn [ctx]
(let [user-id (get-in ctx [:request :user :db/id])]
(update ctx :bindings merge {#'*transacting-user-id* user-id})))})
I don't know enough about the async mode to know whether this is sufficient for that use-case.
This is interesting, thank you. I will investigate this.
Gave implementing this a go in #55. Didn't want to be that guy and post "what's the status on this?" 😆.
Thanks @robert-stuttaford, for the starting point 🙂!