made transactions more general.

This commit is contained in:
Bryce Covert
2020-08-25 07:00:16 -07:00
parent f20bbf9e75
commit bd2d10cf52
4 changed files with 47 additions and 43 deletions

View File

@@ -23,13 +23,13 @@
(defn get-transaction-page [context args value]
(let [args (assoc args :id (:id context))
[transactions transactions-count] (d-transactions/get-graphql (update (<-graphql args) :approval-status enum->keyword "transaction-approval-status"))
[transactions transactions-count] (d-transactions/get-graphql (update (<-graphql (:filters args)) :approval-status enum->keyword "transaction-approval-status"))
transactions (map ->graphql (map approval-status->graphql transactions))]
[{:transactions transactions
:total transactions-count
:count (count transactions)
:start (:start args 0)
:end (+ (:start args 0) (count transactions))}]))
{:data transactions
:total transactions-count
:count (count transactions)
:start (:start (:filters args) 0)
:end (+ (:start (:filters args) 0) (count transactions))}))
(defn unapprove-transactions [context args value]
(let [args (assoc args :id (:id context))