mirror of https://github.com/logseq/logseq
chore: rename :user/login to :user/fetch-info-and-graphs
parent
a46b7226ad
commit
e1c5a40c30
|
@ -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))]
|
||||
|
|
|
@ -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 []
|
||||
|
|
Loading…
Reference in New Issue