avoids duplicate invoices atomic, prevents query that causes warnings.

This commit is contained in:
2021-11-17 21:50:12 -08:00
parent f345788284
commit fe48373943
4 changed files with 79 additions and 37 deletions

View File

@@ -466,6 +466,19 @@
(-> context
(assoc-in [:coeffects :user] (get-in context [:coeffects :db :user]))))))
(def with-role
(re-frame/->interceptor
:id :with-role
:before (fn [context]
(-> context
(assoc-in [:coeffects :role] (-> (get-in context [:coeffects :db :user])
(str/split #"\.")
second
(base64/decodeString )
(#(.parse js/JSON % ))
(js->clj :keywordize-keys true)
:user/role))))))
(def with-is-admin?
(re-frame/->interceptor
:id :with-is-admin?