fix assign form usage

alfred
Josha von Gizycki 4 years ago
parent 5cf380858a
commit d5788b1e84

@ -11,7 +11,6 @@
[link-selection :refer [link-selection]]
[bulk-link-selection :refer [bulk-link-selection]]
[starred :refer [starred]]]
[wanijo.instance.view.starred :refer [starred]]
[wanijo.instance.db :as domain]
[wanijo.instance.forms :as forms-inst]
[wanijo.schema.db :as domain-schema]

@ -44,9 +44,10 @@
(view! uuid req))))
(defn assign-users! [req]
(let [{:keys [uuid assigned]} (form/form-data schema-forms/assign-form req)
(let [assign-form (schema-forms/assign-form (domain-user/all!))
{:keys [uuid assigned]} (form/form-data assign-form req)
permission (get-in req [:params :permission])]
(if (form/valid? schema-forms/assign-form req)
(if (form/valid? assign-form req)
(do
(domain/assign-users! uuid assigned permission)
(resp/redirect (path :schema-show (:params req))))

@ -1,5 +1,5 @@
(ns wanijo.infra.system-test
(:require [clojure.test :refer :all]
(:require [clojure.test :refer [deftest testing is]]
[neo4j-clj.core :as drv]
[clojure.string :as string]
[wanijo.infra.neo4j :as neo4j]

Loading…
Cancel
Save