0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00

🐛 Add missing executor dependency to auth handlers

This commit is contained in:
Andrey Antukh 2022-02-23 09:11:38 +01:00
parent 88706534c2
commit 974084a9ca
2 changed files with 7 additions and 4 deletions

View file

@ -24,6 +24,8 @@
[integrant.core :as ig]
[promesa.exec :as px]))
;; TODO: make it fully async (?)
(defn- build-redirect-uri
[{:keys [provider] :as cfg}]
(let [public (u/uri (:public-uri cfg))]
@ -214,9 +216,9 @@
(redirect-response uri))))
(defn- auth-handler
[{:keys [tokens executors] :as cfg} {:keys [params] :as request} respond _]
[{:keys [tokens executor] :as cfg} {:keys [params] :as request} respond _]
(px/run!
(:default executors)
executor
(fn []
(let [invitation (:invitation-token params)
props (extract-utm-props params)
@ -232,9 +234,9 @@
:body {:redirect-uri uri}})))))
(defn- callback-handler
[{:keys [executors] :as cfg} request respond _]
[{:keys [executor] :as cfg} request respond _]
(px/run!
(:default executors)
executor
(fn []
(try
(let [info (retrieve-info cfg request)

View file

@ -143,6 +143,7 @@
:pool (ig/ref :app.db/pool)
:tokens (ig/ref :app.tokens/tokens)
:audit (ig/ref :app.loggers.audit/collector)
:executor (ig/ref [::default :app.worker/executor])
:public-uri (cf/get :public-uri)}
:app.rpc/rpc