diff --git a/src/clj/auto_ap/routes/exports.clj b/src/clj/auto_ap/routes/exports.clj index 738d00a4..fba3bce1 100644 --- a/src/clj/auto_ap/routes/exports.clj +++ b/src/clj/auto_ap/routes/exports.clj @@ -54,13 +54,14 @@ (map <-graphql (d-vendors/get-graphql {}))) (GET "/transactions/export" {:keys [query-params identity]} (assert-admin identity) - (let [transactions (map <-graphql (d-transactions/get-graphql {:client-id (query-params "client") - :original-id (Integer/parseInt (query-params "original")) - :limit Integer/MAX_VALUE}))] + (let [[transactions] (d-transactions/get-graphql {:client-id (Long/parseLong (query-params "client")) + #_#_:original-id (Integer/parseInt (query-params "original")) + :limit Integer/MAX_VALUE}) + transactions (map <-graphql transactions)] (map (fn [i] (-> i - (update :date to-date) - (update :post-date to-date))) + (update :transaction/date to-date) + (update :transaction/post-date to-date))) transactions))))