|
|
|
@ -72,19 +72,7 @@
|
|
|
|
|
(resp/redirect (path :schema-show (:params req)))
|
|
|
|
|
:flash ["No write permission for schema"])))))
|
|
|
|
|
|
|
|
|
|
(defroutes routes
|
|
|
|
|
(GET "/403" [] {:status 403 :body "NE"})
|
|
|
|
|
(GET (register! :schema-overview "/schema")
|
|
|
|
|
[]
|
|
|
|
|
view-schema/overview!)
|
|
|
|
|
(GET (register! :schema-show "/schema/:uuid")
|
|
|
|
|
[uuid :as req]
|
|
|
|
|
(view! uuid req))
|
|
|
|
|
(POST (register! :schema-new "/schema/new")
|
|
|
|
|
[]
|
|
|
|
|
new!)
|
|
|
|
|
(wrap-allowed-to-write
|
|
|
|
|
(comp/routes
|
|
|
|
|
(defroutes write-routes
|
|
|
|
|
(POST (register! :schema-edit "/schema/edit") []
|
|
|
|
|
edit!)
|
|
|
|
|
(POST (register! :schema-assign-users "/schema/assign/users") []
|
|
|
|
@ -93,4 +81,15 @@
|
|
|
|
|
assign-schemas!)
|
|
|
|
|
(DELETE (register! :schema-delete "/schema/:uuid")
|
|
|
|
|
[uuid :as req]
|
|
|
|
|
(delete-schema! uuid (:session req))))))
|
|
|
|
|
(delete-schema! uuid (:session req))))
|
|
|
|
|
|
|
|
|
|
(defroutes routes
|
|
|
|
|
(GET (register! :schema-overview "/schema") []
|
|
|
|
|
view-schema/overview!)
|
|
|
|
|
(GET (register! :schema-show "/schema/:uuid")
|
|
|
|
|
[uuid :as req]
|
|
|
|
|
(view! uuid req))
|
|
|
|
|
(POST (register! :schema-new "/schema/new") []
|
|
|
|
|
new!)
|
|
|
|
|
(comp/wrap-routes write-routes
|
|
|
|
|
wrap-allowed-to-write))
|
|
|
|
|