I am sending an map to uppdade my database with the following code in luminus:
home.clj:
(defn par [req]
(db/addb (:latest (:params req))))
(defn home-routes []
[ ""
;; {:middleware [middleware/wrap-csrf
;; middleware/wrap-formats]}
["/" {:get home-page}]
["/about" {:get about-page}]
["/test" par]])
queries.clj:
--:name addb :! :n
--:doc adds another booking
INSERT INTO rent
(name,org,parea,barea,tarea,hyra,omk,tid,start,stop,notes,kost,kost2)
VALUES (:name, :org, :parea, :barea, :tarea, :hyra, :omk, :tid, :start, :stop, :notes, :kost, :kost2)
the dict comes from a form on a html page and looks as follows:
{:area2 "187", :tid 8.0, :area1 "166", :block "stora", :barea 187.0, :parea 167.0, :name "noname", :start "1", :hkv 116.32653061224491, :org "999", :stop "2", :kost2 2196.2449, :hyra 61000.0, :tarea 980.0, :notes "notes here", :tk 114000.0, :omk 53000.0, :test 167.0, :kost 274.5306, :pb 354.0}
As seen, the name parameter is there but there is still an error that it is not found. any ideas?