             [monger.collection :as mc]
             [monger.operators :refer :all]
             [clj-http.client :as http]
+            [clj-http.conn-mgr :refer [make-reusable-conn-manager shutdown-manager]]
             [forces-assemble.http-utils :refer :all]
             [liberator.core :refer [defresource]]
             [liberator.dev :refer [wrap-trace]]))

              :form-params (build-notification event client)}))

;; Event logic
(defn add-event-to-channel
  [channel-id event]
  (let [added-event (add-event-to-channel-db channel-id event)]

  :known-content-type? #(check-content-type % [application-json])
  :malformed? #(parse-json % ::data)
  :post! (fn [context]
           (add-event-to-channel-with-pool channel-id (::data context))))

(defresource channel-subscribers [channel-id]
  :allowed-methods [:post]
