From 29e6ebdb833be5825d99aa1b33c84d7c3375dfcf Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sun, 13 Nov 2016 12:56:13 +0100 Subject: [PATCH] Remove useless namespacing for persist auth data in storage. The storage is already namespaced. --- src/uxbox/main/data/auth.cljs | 4 ++-- src/uxbox/main/repo/impl.cljs | 2 +- src/uxbox/main/state.cljs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/uxbox/main/data/auth.cljs b/src/uxbox/main/data/auth.cljs index 6f2a7e64e..814d77e4f 100644 --- a/src/uxbox/main/data/auth.cljs +++ b/src/uxbox/main/data/auth.cljs @@ -28,7 +28,7 @@ rs/WatchEvent (-apply-watch [this state s] - (swap! storage assoc :uxbox/auth data) + (swap! storage assoc :auth data) (rx/of (udu/fetch-profile) (rt/navigate :dashboard/projects)))) @@ -67,7 +67,7 @@ (defrecord Logout [] rs/UpdateEvent (-apply-update [_ state] - (swap! storage dissoc :uxbox/auth) + (swap! storage dissoc :auth) (merge state (dissoc (st/initial-state) :route))) rs/WatchEvent diff --git a/src/uxbox/main/repo/impl.cljs b/src/uxbox/main/repo/impl.cljs index 101290787..30ec0e750 100644 --- a/src/uxbox/main/repo/impl.cljs +++ b/src/uxbox/main/repo/impl.cljs @@ -30,7 +30,7 @@ (defn- auth-headers [] - (when-let [auth (:uxbox/auth storage)] + (when-let [auth (:auth storage)] {"authorization" (str "Token " (:token auth "no-token"))})) (defn- encode-query diff --git a/src/uxbox/main/state.cljs b/src/uxbox/main/state.cljs index 662443252..a1d1c1c63 100644 --- a/src/uxbox/main/state.cljs +++ b/src/uxbox/main/state.cljs @@ -28,7 +28,7 @@ :images-order :name :images-filter ""} :route nil - :auth (:uxbox/auth storage nil) + :auth (:auth storage nil) :clipboard #queue [] :undo {} :profile nil