This commit is contained in:
BC
2019-01-24 22:03:47 -08:00
parent 03051ab3c6
commit d8251c5414

View File

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