mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
feat(rtc): generate salt and encrypt-key when create-db-graph
This commit is contained in:
@@ -189,13 +189,14 @@
|
||||
(let [full-graph-name (string/lower-case (str config/db-version-prefix graph-name))]
|
||||
(some #(= (some-> (:url %) string/lower-case) full-graph-name) (state/get-repos))))
|
||||
|
||||
(defn- create-db [full-graph-name {:keys [file-graph-import? password]}]
|
||||
(defn- create-db [full-graph-name {:keys [file-graph-import? rtc-e2ee-password]}]
|
||||
(->
|
||||
(p/let [config (common-config/create-config-for-db-graph config/config-default-content)
|
||||
_ (persist-db/<new full-graph-name
|
||||
(cond-> {:config config
|
||||
:graph-git-sha config/revision}
|
||||
file-graph-import? (assoc :import-type :file-graph)))
|
||||
file-graph-import? (assoc :import-type :file-graph)
|
||||
rtc-e2ee-password (assoc :rtc-e2ee-password rtc-e2ee-password)))
|
||||
_ (start-repo-db-if-not-exists! full-graph-name)
|
||||
_ (state/add-repo! {:url full-graph-name :root (config/get-local-dir full-graph-name)})
|
||||
_ (restore-and-setup-repo! full-graph-name {:file-graph-import? file-graph-import?})
|
||||
|
||||
Reference in New Issue
Block a user