 (defn- get-testsuites [accept]
   (let [job-names (filter has-testsuites? (keys @builds))]
     (if (= (:mime accept) :json)
-      {:body (zipmap job-names (map testsuites-for job-names))}
-      {:body (csv/export-table ["averageRuntime" "job" "testsuite" "classname" "name"]
-                               (mapcat flat-test-runtimes
-                                       job-names))})))
+      (respond-with-json (zipmap job-names (map testsuites-for job-names)))
+      (respond-with-csv (csv/export-table
+                         ["averageRuntime" "job" "testsuite" "classname" "name"]
+                         (mapcat flat-test-runtimes job-names))))))
 
 ;; app
 

  (if-let [job-results (@test-results job)]
    (if-let [content (job-results build)]
      (if (= (:mime accept) :json)
        {:body (testsuites/testsuites-for content)}
        {:body content
         :headers {"Content-Type" "application/xml;charset=UTF-8"}})
      {:status 404})
    {:status 404}))

;; jobs


                           "application/xml" "text/xml" :as :xml
                           "text/plain" :as :plain]})
      (wrap-resource "public")
      wrap-content-type
      wrap-not-modified))
