everything is audited, and we have expected deposits
This commit is contained in:
16
src/clj/auto_ap/graphql/expected_deposit.clj
Normal file
16
src/clj/auto_ap/graphql/expected_deposit.clj
Normal file
@@ -0,0 +1,16 @@
|
||||
(ns auto-ap.graphql.expected-deposit
|
||||
(:require [auto-ap.datomic.expected-deposit :as d-expected-deposit]
|
||||
[auto-ap.graphql.utils
|
||||
:refer
|
||||
[->graphql <-graphql assert-admin result->page]]))
|
||||
|
||||
(defn get-expected-deposit [context args value]
|
||||
(let [args (assoc args :id (:id context))
|
||||
[sales-orders sales-orders-count] (d-expected-deposit/get-graphql (<-graphql args))]
|
||||
(result->page sales-orders sales-orders-count :data args )))
|
||||
|
||||
(defn get-all-expected-deposits [context args value]
|
||||
(assert-admin (:id context))
|
||||
(map
|
||||
->graphql
|
||||
(first (d-expected-deposit/get-graphql (assoc (<-graphql args) :count Integer/MAX_VALUE)))))
|
||||
Reference in New Issue
Block a user