Create and Update now satisfactory for most records
Date and Time fields are not yet handled correctly.
This commit is contained in:
parent
f274d3be65
commit
7be2225917
|
@ -85,7 +85,8 @@
|
||||||
(symbol "db/*db*")
|
(symbol "db/*db*")
|
||||||
'params)
|
'params)
|
||||||
:message warning
|
:message warning
|
||||||
:error-return {:warnings [warning]}))))
|
:error-return {:warnings [warning]})
|
||||||
|
'params)))
|
||||||
|
|
||||||
|
|
||||||
(defn compose-get-menu-options
|
(defn compose-get-menu-options
|
||||||
|
@ -357,14 +358,18 @@
|
||||||
'merge
|
'merge
|
||||||
'params
|
'params
|
||||||
'result))
|
'result))
|
||||||
(list 'case (:status 'result)
|
(list 'case (list :status 'result)
|
||||||
200 {:message "Record stored"}
|
200 {:message "Record stored"}
|
||||||
201 (list 'try
|
201 (list 'try
|
||||||
(list 'merge
|
(list 'hash-map
|
||||||
(list 'read-string (list :body 'result)))
|
:params
|
||||||
|
(list 'merge 'params
|
||||||
|
(list :body 'result))
|
||||||
|
:message
|
||||||
|
(list 'str "Record created")(list :body 'result))
|
||||||
(list
|
(list
|
||||||
'catch 'Exception 'x
|
'catch 'Exception 'x
|
||||||
{:message (list 'str "Record created: " (list :body 'result))
|
{:message "Record created"
|
||||||
:error "Exception while reading returned key"}))
|
:error "Exception while reading returned key"}))
|
||||||
{:error (list :body 'result)}))))))
|
{:error (list :body 'result)}))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue