chore: rename :user/login to :user/fetch-info-and-graphs

pull/7499/head
Tienson Qin 2022-11-28 17:50:06 +08:00
parent a46b7226ad
commit e1c5a40c30
2 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@
(async/go (async/<! (p->c (persist-var/load-vars)))
(async/<! (sync/<sync-stop))))
(defmethod handle :user/login [[_]]
(defmethod handle :user/fetch-info-and-graphs [[_]]
(state/set-state! [:ui/loading? :login] false)
(async/go
(let [result (async/<! (sync/<user-info sync/remoteapi))]

View File

@ -141,7 +141,7 @@
(go
(<! (<refresh-id-token&access-token))
;; refresh remote graph list by pub login event
(when (user-uuid) (state/pub-event! [:user/login]))))))
(when (user-uuid) (state/pub-event! [:user/fetch-info-and-graphs]))))))
(defn login-callback [code]
(state/set-state! [:ui/loading? :login] true)
@ -152,7 +152,7 @@
(-> resp
:body
(as-> $ (set-tokens! (:id_token $) (:access_token $) (:refresh_token $)))
(#(state/pub-event! [:user/login])))
(#(state/pub-event! [:user/fetch-info-and-graphs])))
(debug/pprint "login-callback" resp)))))
(defn logout []