             [territory-bro.permissions :as permissions]
             [territory-bro.projections :as projections]
             [territory-bro.qgis :as qgis]
+            [territory-bro.subregion :as subregion]
+            [territory-bro.territory :as territory]
             [territory-bro.user :as user]
             [territory-bro.util :refer [getx]])
   (:import (com.auth0.jwt.exceptions JWTVerificationException)

            [ring.util.response :as response]
            [schema.core :as s]
            [territory-bro.authentication :as auth]
            [territory-bro.config :as config]
            [territory-bro.congregation :as congregation]
            [territory-bro.db :as db]
            [territory-bro.dispatcher :as dispatcher]
            [territory-bro.gis-db :as gis-db]

            congregation (congregation/get-my-congregation state cong-id user-id)]
        (when-not congregation
          (forbidden! "No congregation access"))
        (ok (-> ((if (contains? (:query-params request) "new") ; TODO: remove old impl
                   fetch-congregation2
                   fetch-congregation)
                 conn state user-id congregation)
                (format-for-api)
                (validate-congregation)))))))

