This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-30
Channels
- # announcements (40)
- # babashka (41)
- # beginners (32)
- # calva (15)
- # clara (8)
- # clj-kondo (14)
- # cljs-dev (30)
- # clojure (37)
- # clojure-dev (8)
- # clojure-europe (21)
- # clojure-norway (21)
- # clojure-uk (4)
- # clojured (3)
- # clojurescript (4)
- # community-development (10)
- # core-async (13)
- # cursive (23)
- # datomic (15)
- # emacs (9)
- # fulcro (3)
- # google-cloud (4)
- # graphql (24)
- # gratitude (2)
- # holy-lambda (4)
- # honeysql (5)
- # hyperfiddle (9)
- # keechma (1)
- # klipse (5)
- # lsp (23)
- # malli (4)
- # missionary (32)
- # pathom (28)
- # re-frame (2)
- # reagent (40)
- # reitit (17)
- # releases (2)
- # remote-jobs (1)
- # shadow-cljs (25)
- # specter (3)
- # vim (19)
- # xtdb (41)
Hello. I have model with a User and Post entities. A Post belongs to a user. The user must log in to create a post. To model it I have a (defattr :post/user :ref). Now how do I setup my RAD form so that the logged in user is set as the user on the post? Or is it something that I must setup somewhere else? I am using the auth solution from the RAD demo.
Save middleware is typically how I do it. The user will be in the session (which you have to set up on your server), and the pathom env can include anything. I set up the ring middleware to add the request to the pathom env (which has the ring session) and then use that in the save middleware to auto-add ownership to things that have tempids (are new) by type.
Ok thanks