added company and vendor export

This commit is contained in:
BC
2018-07-05 22:40:37 -07:00
parent 916ea071b5
commit 07d7a8ff51

View File

@@ -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)