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

                               (:dataset @handlers)
                               :entity-id entity-id
                               :name name)]
    (when-not location
      (throw (ex-info "No path resolved for Location header"
                      {:entity-id entity-id

    (hash-map :name name
              :entity-id entity-id)))

(defn index-handle-ok [querier ctx]
  (let [entity-id   (entity-id-from ctx)]
    (log/info "index-handle-ok")
    (util/render-items ctx (hecuba/items querier
                             :dataset
                              [[= :entity-id entity-id]]))))

(defn index-handle-created [handlers ctx]
  (let [entity-id   (entity-id-from ctx)
