|
|
@ -13,14 +13,12 @@
|
|
|
|
(defn list! [schema-uuid req]
|
|
|
|
(defn list! [schema-uuid req]
|
|
|
|
(view/list! (domain-schema/find-by-uuid! schema-uuid)
|
|
|
|
(view/list! (domain-schema/find-by-uuid! schema-uuid)
|
|
|
|
(domain/find-by-schema! schema-uuid)
|
|
|
|
(domain/find-by-schema! schema-uuid)
|
|
|
|
(forms-inst/new-form schema-uuid
|
|
|
|
(forms-inst/with-attributes (domain-attr/required! schema-uuid))
|
|
|
|
(domain-attr/required! schema-uuid))
|
|
|
|
|
|
|
|
req))
|
|
|
|
req))
|
|
|
|
|
|
|
|
|
|
|
|
(defn new! [req]
|
|
|
|
(defn new! [req]
|
|
|
|
(let [schema-uuid (get-in req [:params :schema-uuid])
|
|
|
|
(let [schema-uuid (get-in req [:params :schema-uuid])
|
|
|
|
form-def (forms-inst/new-form schema-uuid
|
|
|
|
form-def (forms-inst/with-attributes (domain-attr/required! schema-uuid))]
|
|
|
|
(domain-attr/required! schema-uuid))]
|
|
|
|
|
|
|
|
(if (form/valid? form-def req)
|
|
|
|
(if (form/valid? form-def req)
|
|
|
|
(let [form-data (form/form-data form-def req)
|
|
|
|
(let [form-data (form/form-data form-def req)
|
|
|
|
req-attrs (domain-attr/required! schema-uuid)
|
|
|
|
req-attrs (domain-attr/required! schema-uuid)
|
|
|
|