From aadb7cb1bf4ab858c91cdfa730546b82edc8e42f Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 7 Jul 2022 13:12:38 +0200 Subject: [PATCH] :sparkles: Don't call rp/command internal method --- frontend/src/app/main/data/users.cljs | 10 +++++----- frontend/src/app/main/ui/auth/register.cljs | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/app/main/data/users.cljs b/frontend/src/app/main/data/users.cljs index 8ac192d97..104b2619e 100644 --- a/frontend/src/app/main/data/users.cljs +++ b/frontend/src/app/main/data/users.cljs @@ -206,7 +206,7 @@ ;; the returned profile is an NOT authenticated profile, we ;; proceed to logout and show an error message. - (->> (rp/command :login-with-password (d/without-nils params)) + (->> (rp/command! :login-with-password (d/without-nils params)) (rx/merge-map (fn [data] (rx/merge (rx/of (fetch-profile)) @@ -292,7 +292,7 @@ (ptk/reify ::logout ptk/WatchEvent (watch [_ _ _] - (->> (rp/command :logout) + (->> (rp/command! :logout) (rx/delay-at-least 300) (rx/catch (constantly (rx/of 1))) (rx/map #(logged-out params))))))) @@ -494,7 +494,7 @@ :or {on-error rx/throw on-success identity}} (meta data)] - (->> (rp/command :request-profile-recovery data) + (->> (rp/command! :request-profile-recovery data) (rx/tap on-success) (rx/catch on-error)))))) @@ -513,7 +513,7 @@ (let [{:keys [on-error on-success] :or {on-error rx/throw on-success identity}} (meta data)] - (->> (rp/command :recover-profile data) + (->> (rp/command! :recover-profile data) (rx/tap on-success) (rx/catch on-error)))))) @@ -524,7 +524,7 @@ (ptk/reify ::create-demo-profile ptk/WatchEvent (watch [_ _ _] - (->> (rp/command :create-demo-profile {}) + (->> (rp/command! :create-demo-profile {}) (rx/map login))))) diff --git a/frontend/src/app/main/ui/auth/register.cljs b/frontend/src/app/main/ui/auth/register.cljs index 6eeeed243..f2e3a4fd0 100644 --- a/frontend/src/app/main/ui/auth/register.cljs +++ b/frontend/src/app/main/ui/auth/register.cljs @@ -90,7 +90,7 @@ (fn [form _event] (reset! submitted? true) (let [cdata (:clean-data @form)] - (->> (rp/command :prepare-register-profile cdata) + (->> (rp/command! :prepare-register-profile cdata) (rx/map #(merge % params)) (rx/finalize #(reset! submitted? false)) (rx/subs @@ -225,7 +225,7 @@ (fn [form _event] (reset! submitted? true) (let [params (:clean-data @form)] - (->> (rp/command :register-profile params) + (->> (rp/command! :register-profile params) (rx/finalize #(reset! submitted? false)) (rx/subs on-success (partial handle-register-error form))))))]