diff --git a/app/src/config/about.ts b/app/src/config/about.ts index 94432d4ef..7b8891ad4 100644 --- a/app/src/config/about.ts +++ b/app/src/config/about.ts @@ -339,7 +339,7 @@ export const about = { } confirmDialog("🔑 " + window.siyuan.languages.genKeyByPW, window.siyuan.languages.initRepoKeyTip, () => { initDialog.destroy(); - fetchPost("/api/repo/InitRepoKeyFromPassphrase", {pass: inputElement.value}, (response) => { + fetchPost("/api/repo/initRepoKeyFromPassphrase", {pass: inputElement.value}, (response) => { window.siyuan.config.repo.key = response.data.key; importKeyElement.parentElement.classList.add("fn__none"); importKeyElement.parentElement.nextElementSibling.classList.remove("fn__none"); diff --git a/app/src/mobile/util/menu.ts b/app/src/mobile/util/menu.ts index 7858a4ce1..882a0de47 100644 --- a/app/src/mobile/util/menu.ts +++ b/app/src/mobile/util/menu.ts @@ -361,7 +361,7 @@ ${accountHTML} } confirmDialog("🔑 " + window.siyuan.languages.genKeyByPW, window.siyuan.languages.initRepoKeyTip, () => { initDialog.destroy(); - fetchPost("/api/repo/InitRepoKeyFromPassphrase", {pass: inputElement.value}, (response) => { + fetchPost("/api/repo/initRepoKeyFromPassphrase", {pass: inputElement.value}, (response) => { window.siyuan.config.repo.key = response.data.key; importKeyElement.parentElement.classList.add("fn__none"); importKeyElement.parentElement.nextElementSibling.classList.remove("fn__none"); diff --git a/app/src/sync/syncGuide.ts b/app/src/sync/syncGuide.ts index 9056061b5..fccaa8db5 100644 --- a/app/src/sync/syncGuide.ts +++ b/app/src/sync/syncGuide.ts @@ -225,7 +225,7 @@ const setKey = () => { return; } confirmDialog("🔑 " + window.siyuan.languages.genKeyByPW, window.siyuan.languages.initRepoKeyTip, () => { - fetchPost("/api/repo/InitRepoKeyFromPassphrase", {pass: inputElement.value}, (response) => { + fetchPost("/api/repo/initRepoKeyFromPassphrase", {pass: inputElement.value}, (response) => { setSync(response.data.key, dialog); }); }); diff --git a/kernel/api/router.go b/kernel/api/router.go index e87d6364f..5d4741690 100644 --- a/kernel/api/router.go +++ b/kernel/api/router.go @@ -284,7 +284,7 @@ func ServeAPI(ginServer *gin.Engine) { ginServer.Handle("POST", "/api/bazaar/getBazaarPackageREAME", model.CheckAuth, getBazaarPackageREAME) ginServer.Handle("POST", "/api/repo/initRepoKey", model.CheckAuth, initRepoKey) - ginServer.Handle("POST", "/api/repo/InitRepoKeyFromPassphrase", model.CheckAuth, initRepoKeyFromPassphrase) + ginServer.Handle("POST", "/api/repo/initRepoKeyFromPassphrase", model.CheckAuth, initRepoKeyFromPassphrase) ginServer.Handle("POST", "/api/repo/resetRepo", model.CheckAuth, resetRepo) ginServer.Handle("POST", "/api/repo/importRepoKey", model.CheckAuth, importRepoKey) ginServer.Handle("POST", "/api/repo/createSnapshot", model.CheckAuth, createSnapshot)