Fix home page always refresh

pull/645/head
Tienson Qin 2020-08-30 00:23:47 +08:00
parent 504b07005a
commit 29ee8e7cfb
3 changed files with 8 additions and 3 deletions

View File

@ -2091,7 +2091,6 @@
transaction (mapv (fn [name] [:db/retractEntity (:db/id (get-page (str name)))]) orphaned-pages)]
(transact! transaction)))
(comment
(defn debug!
[]

View File

@ -21,6 +21,7 @@
[frontend.handler.project :as project-handler]
[frontend.handler.notification :as notification]
[frontend.handler.route :as route-handler]
[frontend.handler.user :as user-handler]
[frontend.ui :as ui]
[cljs-time.local :as tl]
[cljs-time.core :as t]
@ -136,9 +137,15 @@
{:installation-ids installation-ids
:repos repos}
(fn [result]
(if (= "refresh" (:message result))
(cond
(= "refresh" (:message result))
;; reload
(set! (.-href js/window.location) config/website)
(= "clear" (:message result))
(user-handler/sign-out! nil)
:else
(do
(state/set-github-installation-tokens! result)
(when ok-handler (ok-handler)))))

View File

@ -6,7 +6,6 @@
[frontend.storage :as storage]
[promesa.core :as p]
[goog.object :as gobj]
[frontend.handler.repo :as repo-handler]
[frontend.handler.notification :as notification])
(:import [goog.format EmailAddress]))