               congregation (congregation/get-my-congregation state cong-id user-id)]
           (when-not congregation
             (forbidden! "No congregation access"))
-          (ok (-> (fetch-congregation conn state user-id congregation)
+          (ok (-> congregation
+                  (merge-congregation-details state user-id)
+                  (enrich-congregation conn)
                   (format-for-api)
                   (validate-congregation))))))))
 

                           (congregation/get-unrestricted-congregation state cong-id))]
        (when-not congregation
          (forbidden! "No demo congregation"))
        (ok (-> (fetch-congregation conn state user-id congregation)
                (assoc :id "demo")
                (assoc :name "Demo Congregation")
                (assoc :permissions {:viewCongregation true})

     :congregation-boundaries (sequence (vals (get-in state [::congregation-boundary/congregation-boundaries cong-id])))
     :regions (sequence (vals (get-in state [::region/regions cong-id])))
     :card-minimap-viewports (sequence (vals (get-in state [::card-minimap-viewport/card-minimap-viewports cong-id])))
     :users (for [user-id (congregation/get-users state cong-id)]
              {:id user-id})}))

(defn- enrich-congregation [congregation conn]
  (let [user-ids (->> (:users congregation)
                      (map :id))]
    (-> congregation
        (assoc :users (->> (user/get-users conn {:ids user-ids})
                           (map (fn [user]
                                  (-> (:user/attributes user)
                                      (assoc :id (:user/id user))
                                      (assoc :sub (:user/subject user))))))))))

(def ^:private validate-congregation (s/validator Congregation))

