|
|
|
@ -12,8 +12,8 @@
|
|
|
|
|
(let [schema-uuid (get-in req [:params :schema])]
|
|
|
|
|
(if (form/valid? view-schema/attr-form req)
|
|
|
|
|
(do
|
|
|
|
|
(domain/create-new! (merge {:required 0}
|
|
|
|
|
(:params req))
|
|
|
|
|
(domain/create-new! (form/form-data view-schema/attr-form
|
|
|
|
|
req)
|
|
|
|
|
schema-uuid
|
|
|
|
|
(get-in req [:session :uuid]))
|
|
|
|
|
(resp/redirect (path :schema-show {:uuid schema-uuid})))
|
|
|
|
@ -22,7 +22,7 @@
|
|
|
|
|
(defn edit! [schema-uuid req]
|
|
|
|
|
(if (form/valid? view-schema/attr-form req)
|
|
|
|
|
(do
|
|
|
|
|
(domain/edit! (:params req))
|
|
|
|
|
(domain/edit! (form/form-data view-schema/attr-form req))
|
|
|
|
|
(resp/redirect (path :schema-show {:uuid schema-uuid})))
|
|
|
|
|
(routes-schema/view! schema-uuid req)))
|
|
|
|
|
|
|
|
|
|