|
|
@ -94,9 +94,13 @@
|
|
|
|
:name (:name form-data)
|
|
|
|
:name (:name form-data)
|
|
|
|
:to (:instances form-data)
|
|
|
|
:to (:instances form-data)
|
|
|
|
:by (get-in req [:session :uuid])})
|
|
|
|
:by (get-in req [:session :uuid])})
|
|
|
|
(resp/redirect (path :instance-show {:uuid uuid})))
|
|
|
|
(resp/redirect (path :instance-edit-form {:uuid uuid})))
|
|
|
|
(link-selection! uuid schema-uuid req))))
|
|
|
|
(link-selection! uuid schema-uuid req))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defn delete-link! [uuid link-uuid req]
|
|
|
|
|
|
|
|
(domain/delete-link! link-uuid)
|
|
|
|
|
|
|
|
(resp/redirect (path :instance-edit-form {:uuid uuid})))
|
|
|
|
|
|
|
|
|
|
|
|
(defroutes routes
|
|
|
|
(defroutes routes
|
|
|
|
(wrap-routes
|
|
|
|
(wrap-routes
|
|
|
|
(GET (register! :instance-list "/instance/list/:schema-uuid")
|
|
|
|
(GET (register! :instance-list "/instance/list/:schema-uuid")
|
|
|
@ -122,7 +126,11 @@
|
|
|
|
"/instance/:uuid/link/:schema-uuid")
|
|
|
|
"/instance/:uuid/link/:schema-uuid")
|
|
|
|
[uuid schema-uuid :as req]
|
|
|
|
[uuid schema-uuid :as req]
|
|
|
|
(link-selection! uuid schema-uuid req))
|
|
|
|
(link-selection! uuid schema-uuid req))
|
|
|
|
(POST (register! :instance-create-link
|
|
|
|
(POST (register! :instance-link-create
|
|
|
|
"/instance/:uuid/link/:schema-uuid")
|
|
|
|
"/instance/:uuid/link/:schema-uuid")
|
|
|
|
[uuid schema-uuid :as req]
|
|
|
|
[uuid schema-uuid :as req]
|
|
|
|
(create-link! uuid schema-uuid req)))
|
|
|
|
(create-link! uuid schema-uuid req))
|
|
|
|
|
|
|
|
(DELETE (register! :instance-link-delete
|
|
|
|
|
|
|
|
"/instance/:uuid/link/:link-uuid")
|
|
|
|
|
|
|
|
[uuid link-uuid :as req]
|
|
|
|
|
|
|
|
(delete-link! uuid link-uuid req)))
|
|
|
|