Fork me on GitHub
#biff
<
2022-09-26
>
Jacob O'Bryant18:09:39

This Thursday at 9:30 AM Pacific I'm gonna take a crack at using Fly Machines as a sandbox for untrusted Babashka scripts. I've never touched Fly before so hopefully we don't run into any pitfalls/timesinks 🙂 . Zoom link: https://us06web.zoom.us/j/82039492586?pwd=ZU9TejI4c1E2N0xiWmh6UllNbmFJUT09 RSVP on Meetup to get a calendar invite: https://www.meetup.com/biff-coding/events/288235328/

macrobartfast21:09:27

I think one of the Biff livestreams adds a web form in… can anyone remember which one it was (if I’m right)?

macrobartfast21:09:32

that’s the one! thx!

macrobartfast23:09:41

Is there a way to see what the`params` are within this function when a form is submitted from the frontend?

(defn set-bar [{:keys [session params] :as req}]
  (biff/submit-tx req
                  [{:db/op :update
                    :db/doc-type :user
                    :xt/id (:uid session)
                    :user/bar (:bar params)}])
  (biff/render (bar-form {:value (:bar params)})))

Jacob O'Bryant23:09:18

Yep, two ways I commonly do it: • add a (prn params) (or (biff/pprint params)) right before the submit-tx • add a (def params* params) right before the submit-tx, then inspect params* from the repl

macrobartfast23:09:34

<sound of steel through air> 🥷