From 07d7a8ff51ea1dded635786ca9a33812fa954e96 Mon Sep 17 00:00:00 2001 From: BC Date: Thu, 5 Jul 2018 22:40:37 -0700 Subject: [PATCH] added company and vendor export --- src/clj/auto_ap/routes/exports.clj | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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)