adding authorization
This commit is contained in:
@@ -326,7 +326,7 @@
|
||||
|
||||
invoices (map
|
||||
->graphql
|
||||
(invoices/get-graphql (<-graphql args)))
|
||||
(invoices/get-graphql (<-graphql (assoc args :id (:id context)))))
|
||||
invoice-count (invoices/count-graphql (<-graphql args))]
|
||||
(resolve/with-context
|
||||
[{:invoices invoices
|
||||
@@ -423,7 +423,7 @@
|
||||
|
||||
(defn get-company [context args value]
|
||||
(->graphql
|
||||
(filter #(can-see-company? (:identity context) %)
|
||||
(filter #(can-see-company? (:id context) %)
|
||||
(companies/get-all))))
|
||||
|
||||
(defn join-companies [users]
|
||||
@@ -515,4 +515,4 @@
|
||||
(query id q nil ))
|
||||
([id q v]
|
||||
(println "executing graphql query" id q v)
|
||||
(simplify (execute schema q v {:identity id}))))
|
||||
(simplify (execute schema q v {:id id}))))
|
||||
|
||||
Reference in New Issue
Block a user