go easy on functions

integration-tests
Josha von Gizycki 6 years ago
parent 2ccb94a944
commit 79c5881b2d

@ -17,12 +17,6 @@
(resp/redirect "/schema")) (resp/redirect "/schema"))
(view-schema/overview! req))) (view-schema/overview! req)))
(defn show-schema! [uuid req]
(view-schema/show-schema!
(domain/find-by-uuid! uuid)
(attr-domain/find-by-schema! uuid)
req))
(defn delete-schema! [uuid session] (defn delete-schema! [uuid session]
(if (domain/can-user-modify? uuid (:uuid session)) (if (domain/can-user-modify? uuid (:uuid session))
(do (do
@ -36,7 +30,10 @@
view-schema/overview!) view-schema/overview!)
(GET (register! :schema-show "/schema/:uuid") (GET (register! :schema-show "/schema/:uuid")
[uuid :as req] [uuid :as req]
(show-schema! uuid req)) (view-schema/show-schema!
(domain/find-by-uuid! uuid)
(attr-domain/find-by-schema! uuid)
req))
(POST (register! :schema-new "/schema/new") (POST (register! :schema-new "/schema/new")
[] []
new!) new!)

Loading…
Cancel
Save