             [taoensso.timbre :as timbre]
             [compojure.core :as compojure :refer (ANY OPTIONS DELETE)]
             [liberator.core :refer (defresource by-method)]
+            [clojure.walk :refer (keywordize-keys)]
             [schema.core :as schema]
             [oc.lib.schema :as lib-schema]
             [oc.lib.db.pool :as pool]

      (ANY "/orgs/:org-slug/boards/:board-slug/entries/:entry-uuid/share/"
        [org-slug board-slug entry-uuid]
        (pool/with-pool [conn db-pool]
          (share conn org-slug board-slug entry-uuid))))))
    
    true)) ; no existing entry, so this will fail existence check later

(defn- valid-follow-up-request? [conn entry-uuid follow-up-map user]
  (let [existing-entry (entry-res/get-entry conn entry-uuid)
        ts (db-common/current-timestamp)
        with-keys (keywordize-keys follow-up-map)
        self? (:self with-keys)
        assignees (if self?
                    [(lib-schema/author-for-user user)]
                    (:assignees with-keys))
        follow-ups (map #(hash-map :assignee %
                                  :uuid (db-common/unique-id)
                                  :created-at ts
                                  :author (lib-schema/author-for-user user)
                                  :completed? false)
                         assignees)]
    (if existing-entry
      (if (every? #(lib-schema/valid? common-res/FollowUp %) follow-ups)
        {:existing-entry (api-common/rep existing-entry)
         :self? self?
         :follow-ups (api-common/rep follow-ups)}
        [false, {:follow-ups (api-common/rep follow-ups)}]) ; invalid share request
      true))) ;; wil fail existence later

(defn- entry-list-for-board
  "Retrieve an entry list for the board, or false if the org or board doesn't exist."
  [conn org-slug board-slug-or-uuid ctx]
