I want to created post as return value just after execute my db query function. Here is one example from my db functions:
(defn add-post-record [post]
(sql/with-connection
db
(sql/insert-record :post post )))
and what i need in my route is something like:
(def post (db/add-post-record {:title title
:body body
:owner user
:isdraft isdraft}))
Then i am gonna use this like: (:id post)
I am so new in clojure. This may be a very simple problem but i am stuck.
thank you.