From ed79c8cd49615aac344a8f6b67b24b3cb0c44f95 Mon Sep 17 00:00:00 2001 From: "xiaoqi.cxq" Date: Thu, 13 Oct 2022 13:53:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=96=87=E6=A1=A3=E7=A9=BA?= =?UTF-8?q?=E9=97=B4=E9=93=BE=E6=8E=A5=E5=A4=8D=E5=88=B6=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=97=A0=E6=B3=95=E8=BF=9B=E5=85=A5=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/providers/helpers/giteaHelper.js | 1 + src/services/providers/helpers/githubHelper.js | 1 + src/services/providers/helpers/wordpressHelper.js | 1 + 3 files changed, 3 insertions(+) diff --git a/src/services/providers/helpers/giteaHelper.js b/src/services/providers/helpers/giteaHelper.js index 53b667d4..7f84b2f9 100644 --- a/src/services/providers/helpers/giteaHelper.js +++ b/src/services/providers/helpers/giteaHelper.js @@ -61,6 +61,7 @@ export default { let clientId = applicationId; let useServerConf = false; // 获取gitea配置的参数 + await networkSvc.getServerConf(); const confClientId = store.getters['data/serverConf'].giteaClientId; const confServerUrl = store.getters['data/serverConf'].giteaUrl; // 存在gitea配置则使用后端配置 diff --git a/src/services/providers/helpers/githubHelper.js b/src/services/providers/helpers/githubHelper.js index eacfdde5..ba61d406 100644 --- a/src/services/providers/helpers/githubHelper.js +++ b/src/services/providers/helpers/githubHelper.js @@ -63,6 +63,7 @@ export default { * https://developer.github.com/apps/building-oauth-apps/authorization-options-for-oauth-apps/ */ async startOauth2(scopes, sub = null, silent = false) { + await networkSvc.getServerConf(); const clientId = store.getters['data/serverConf'].githubClientId; // Get an OAuth2 code diff --git a/src/services/providers/helpers/wordpressHelper.js b/src/services/providers/helpers/wordpressHelper.js index 6d77d7ee..c109bfd1 100644 --- a/src/services/providers/helpers/wordpressHelper.js +++ b/src/services/providers/helpers/wordpressHelper.js @@ -18,6 +18,7 @@ export default { * https://developer.wordpress.com/docs/oauth2/ */ async startOauth2(sub = null, silent = false) { + await networkSvc.getServerConf(); const clientId = store.getters['data/serverConf'].wordpressClientId; // Get an OAuth2 code