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