|
|
@ -44,9 +44,14 @@
|
|
|
|
(domain/find-properties! uuid)))
|
|
|
|
(domain/find-properties! uuid)))
|
|
|
|
|
|
|
|
|
|
|
|
(defn show! [uuid req]
|
|
|
|
(defn show! [uuid req]
|
|
|
|
|
|
|
|
(view/show! (instance! uuid)
|
|
|
|
|
|
|
|
(domain-attr/find-by-instance! uuid)
|
|
|
|
|
|
|
|
req))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defn edit-form! [uuid req]
|
|
|
|
(let [instance (instance! uuid)
|
|
|
|
(let [instance (instance! uuid)
|
|
|
|
attrs (domain-attr/find-by-instance! uuid)]
|
|
|
|
attrs (domain-attr/find-by-instance! uuid)]
|
|
|
|
(view/show! instance
|
|
|
|
(view/edit! instance
|
|
|
|
(form! uuid)
|
|
|
|
(form! uuid)
|
|
|
|
(forms-inst/instance->form-data instance)
|
|
|
|
(forms-inst/instance->form-data instance)
|
|
|
|
req)))
|
|
|
|
req)))
|
|
|
@ -74,6 +79,9 @@
|
|
|
|
(GET (register! :instance-show "/instance/:uuid")
|
|
|
|
(GET (register! :instance-show "/instance/:uuid")
|
|
|
|
[uuid :as req]
|
|
|
|
[uuid :as req]
|
|
|
|
(show! uuid req))
|
|
|
|
(show! uuid req))
|
|
|
|
|
|
|
|
(GET (register! :instance-edit-form "/instance/:uuid/edit")
|
|
|
|
|
|
|
|
[uuid :as req]
|
|
|
|
|
|
|
|
(edit-form! uuid req))
|
|
|
|
(POST (register! :instance-edit "/instance/:uuid")
|
|
|
|
(POST (register! :instance-edit "/instance/:uuid")
|
|
|
|
[uuid :as req]
|
|
|
|
[uuid :as req]
|
|
|
|
(edit! uuid req)))
|
|
|
|
(edit! uuid req)))
|
|
|
|