adding authorization

This commit is contained in:
Bryce Covert
2018-07-10 20:16:26 -07:00
parent d87ebbbfe4
commit dd9b7ce86e
6 changed files with 27 additions and 9 deletions

View File

@@ -25,14 +25,15 @@
(companies/get-by-id (:company_id value)))))
(defn get-check-page [context args value]
(let [extra-context
(let [args (assoc args :id (:id context))
extra-context
(cond-> {}
(executor/selects-field? context :invoice/vendor) (assoc :vendor-cache (by :id (vendors/get-all)))
(executor/selects-field? context :invoice/company) (assoc :company-cache (by :id (companies/get-all))))
checks (map
->graphql
(checks/get-graphql (<-graphql args)))
(checks/get-graphql (<-graphql args)))
checks-count (checks/count-graphql (<-graphql args))]
(resolve/with-context
[{:checks checks