graphql mutations are locked by user type.

This commit is contained in:
BC
2018-07-10 22:13:53 -07:00
parent e0ba9395ef
commit 9189c820d7
5 changed files with 26 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
(ns auto-ap.graphql.checks
(:require [auto-ap.graphql.utils :refer [->graphql <-graphql]]
(:require [auto-ap.graphql.utils :refer [->graphql <-graphql assert-can-see-company]]
[com.walmartlabs.lacinia :refer [execute]]
[com.walmartlabs.lacinia.executor :as executor]
@@ -44,6 +44,7 @@
(defn add-handwritten-check [context args value]
(let [invoice (invoices/get-by-id (:invoice_id args))
_ (assert-can-see-company (:id context) (:company-id invoice))
check (checks/insert! {:s3-uuid nil
:s3-key nil
:s3-url nil