Model instance to map
eko234 opened this issue · 1 comments
eko234 commented
hi @camsaul, I'm new to clojure, I'm trying to use toucan to build a rest api, but I can't find a way to respond to a request with a map that represents a record on my database, I have the following code:
(defn dbh [req]
(let [user (User 3)]
{:status 200
:headers {"Content-Type" "application/json"}
:body user }))
but when I make a request i just get what seems to me (I don't know clojure) like a sequence of pairs
[:id 3][:name "wayne"][:email "wayne@moon.com"][:password "ImFzZGFzZCI=.5lcSa6XsqitTjnXVD3BSGptcVbQ="]
could you please point me to the right direction to get a proper response?
eko234 commented
nvm, it has nothing to do with toucan.