made transactions more general.
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user