This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-13
Channels
- # aleph (2)
- # announcements (1)
- # beginners (133)
- # cider (29)
- # cljdoc (9)
- # cljs-dev (2)
- # cljsjs (3)
- # cljsrn (1)
- # clojure (146)
- # clojure-dev (26)
- # clojure-europe (3)
- # clojure-italy (26)
- # clojure-japan (6)
- # clojure-nl (76)
- # clojure-spec (4)
- # clojure-uk (42)
- # clojurescript (17)
- # cursive (43)
- # datascript (1)
- # datomic (28)
- # emacs (4)
- # figwheel-main (13)
- # fulcro (26)
- # hyperfiddle (2)
- # jobs (9)
- # jobs-discuss (6)
- # leiningen (1)
- # mount (5)
- # onyx (8)
- # pathom (5)
- # pedestal (2)
- # re-frame (52)
- # reagent (21)
- # reitit (58)
- # ring-swagger (24)
- # shadow-cljs (95)
- # sql (14)
- # test-check (10)
- # yada (18)
dumb question … where do I put the config for insert-interceptor
… in routes?
@raymcdermott config?
@raymcdermott we have something like this:
(-> model
...
yada/resource
(insert-interceptor i/available?
log-charset)
...)
we have all our routes declared in a bidi form
ok, I guess I don’t know what your flow does there
(defn insert-interceptor [res point & interceptors]
(update res :interceptor-chain
(partial mapcat (fn [i]
(if (= i point)
(concat interceptors [i])
[i])))))
insert-interceptor
takes a resource, this is decoupled from your bidi-routesI was thinking that I would just add another function to wrap the insertion
but you are fancier than me 😉
ah, ok - we still have a sh1tload of boilerplate
should clean it up once we get serious
cool, makes sense
thanks for the advice