diff --git a/src/clj/auto_ap/routes/exports.clj b/src/clj/auto_ap/routes/exports.clj index c6939c47..8fb32e82 100644 --- a/src/clj/auto_ap/routes/exports.clj +++ b/src/clj/auto_ap/routes/exports.clj @@ -3,6 +3,8 @@ [auto-ap.db.invoices :as invoices] [auto-ap.db.checks :as checks] [auto-ap.db.transactions :as transactions] + [auto-ap.db.companies :as companies] + [auto-ap.db.vendors :as vendors] [auto-ap.db.utils :refer [query]] [auto-ap.utils :refer [by]] [auto-ap.parse :as parse] @@ -27,9 +29,14 @@ (map (fn [i] (update i :date to-date)) checks))) + + (GET "/companies/export" {:keys [query-params]} + (companies/get-all)) + + (GET "/vendors/export" {:keys [query-params]} + (vendors/get-all)) (GET "/transactions/export" {:keys [query-params]} (let [transactions (transactions/get-graphql {:company (query-params "company")})] - (println transactions) (map (fn [i] (-> i (update :date to-date)