Safety commit
Ran out of electricity last night when I'd almost but not quite got creation working properly. Frustrating! I don't have much electricity this morning so I'm pushing this up to GitHub for safety.
This commit is contained in:
parent
c1d1bf59e8
commit
f274d3be65
|
@ -293,7 +293,7 @@
|
||||||
(list 'support/resolve-template (str (path-part f e a) ".html"))
|
(list 'support/resolve-template (str (path-part f e a) ".html"))
|
||||||
(list 'merge
|
(list 'merge
|
||||||
{:title (capitalise (:name (:attrs f)))
|
{:title (capitalise (:name (:attrs f)))
|
||||||
:params 'params}
|
:params (list 'merge (property-defaults e) 'params)}
|
||||||
(case (:tag f)
|
(case (:tag f)
|
||||||
:form (make-form-get-handler-content f e a n)
|
:form (make-form-get-handler-content f e a n)
|
||||||
:page (make-page-get-handler-content f e a n)
|
:page (make-page-get-handler-content f e a n)
|
||||||
|
@ -359,7 +359,13 @@
|
||||||
'result))
|
'result))
|
||||||
(list 'case (:status 'result)
|
(list 'case (:status 'result)
|
||||||
200 {:message "Record stored"}
|
200 {:message "Record stored"}
|
||||||
201 (str "Record created: " (list :body 'result))
|
201 (list 'try
|
||||||
|
(list 'merge
|
||||||
|
(list 'read-string (list :body 'result)))
|
||||||
|
(list
|
||||||
|
'catch 'Exception 'x
|
||||||
|
{:message (list 'str "Record created: " (list :body 'result))
|
||||||
|
:error "Exception while reading returned key"}))
|
||||||
{:error (list :body 'result)}))))))
|
{:error (list :body 'result)}))))))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue