   (get-in ctx [:request :route-params :entity-id]))
 
 (defn- name-from [ctx]
-  (get-in ctx [:request :route-params :namee]))
+  (get-in ctx [:request :route-params :name]))
 
 (defn index-post! [commander ctx]
-  (let [request                (:request ctx)
+   (log/info "index-post!")
+
+   (let [request                (:request ctx)
         {:keys [members name]} (decode-body request)
         entity-id              (entity-id-from ctx)
         members-str            (string/join \, members)

  (:require
   [bidi.bidi :as bidi]
   [clojure.string :as string]
   [kixi.hecuba.protocols :as hecuba]
   [kixi.hecuba.queue :as q]
   [kixi.hecuba.security :as sec]

  :allowed-methods       #{:get :post}
  :available-media-types #{"application/edn" "text/html"}
  :authorized?           (authorized? querier :datasets)
  :post!                 (partial index-post! commander)
  :handle-ok             (partial index-handle-ok querier)
  :handle-created        (partial index-handle-created handlers))

(defn resource-exists? [querier ctx]
  (let [request      (:request ctx)
        route-params (:route-params request)
        {:keys [entity-id name]} route-params]
    (log/infof "resource-exists? :%s:%s" entity-id name)

    (when-let [item (first (hecuba/items querier :dataset [[= :entity-id entity-id]
                                                           [= :name name]]))]
        {::item item}
        #_(throw (ex-info (format "Cannot find item of id %s"))))))

