From a400a10a12ca336b311d1452478f8ebc036f9fa8 Mon Sep 17 00:00:00 2001 From: AiHaibara <166741903+jyx04@users.noreply.github.com> Date: Tue, 11 Jun 2024 15:36:09 +0800 Subject: [PATCH] Update _worker.js --- _worker.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/_worker.js b/_worker.js index 55b00aa..c2d2088 100644 --- a/_worker.js +++ b/_worker.js @@ -354,7 +354,7 @@ function getInitialFieldsHTML() { { name: 'Admin', label: '【必填】管理员 (用于管理面板的验证使用,且可看所有聊天记录)' ,isrequired: 'required'}, { name: 'TurnstileKeys', label: '【必填】Turnstile密钥' ,isrequired: 'required'}, { name: 'TurnstileSiteKey', label: '【必填】Turnstile站点密钥' ,isrequired: 'required'}, - { name: 'TurnstileSiteKey', label: '【选填】有值则禁用Turnstile验证,以上两个参数随意' }, + { name: 'Remove Turnstile', label: '【选填】有值则禁用Turnstile验证,以上两个参数随意' }, { name: 'WorkerURL', label: '站点域名 (无需https://【选填,不填则自动储存worker的域名】' }, { name: 'VoiceURL', label: 'voice服务域名 (无需https://【选填,不填则自动储存worker的域名】' }, { name: 'FreeURL', label: 'Free选车面板域名 (无需https://【选填,不填则自动储存worker的域名】' }, @@ -601,7 +601,7 @@ async function generatePlusResponse(message, adminuserName) { async function getPlusHTML() { const WorkerURL = await KV.get('WorkerURL'); const turnstileSiteKey = await KV.get('TurnstileSiteKey'); - const removeTurnstile = KV.get('RemoveTurnstile')||''; + const removeTurnstile = await KV.get('RemoveTurnstile')||''; return ` @@ -834,7 +834,7 @@ else {return new Response('Unauthorized access', { status: 403 }); async function getExportHTML() { const turnstileSiteKey = await KV.get('TurnstileSiteKey'); - const removeTurnstile = KV.get('RemoveTurnstile')||''; + const removeTurnstile = await KV.get('RemoveTurnstile')||''; return ` @@ -1019,7 +1019,7 @@ async function generateAdminResponse(message) { async function getAdminHTML() { const WorkerURL=await KV.get('WorkerURL'); const turnstileSiteKey=await KV.get('TurnstileSiteKey'); - const removeTurnstile = KV.get('RemoveTurnstile')||''; + const removeTurnstile = await KV.get('RemoveTurnstile')||''; return ` @@ -1428,7 +1428,7 @@ async function queryLimits(accessToken, shareToken) { async function getUserHTML() { const turnstileSiteKey=await KV.get('TurnstileSiteKey'); - const removeTurnstile = KV.get('RemoveTurnstile')||''; + const removeTurnstile = await KV.get('RemoveTurnstile')||''; return ` @@ -1629,7 +1629,7 @@ async function getRegisterHTML() { const turnstileSiteKey=await KV.get('TurnstileSiteKey'); const websiteName = await KV.get('WebName') || 'Haibara AI'; const logourl = await KV.get('LogoURL') || logo; - const removeTurnstile = KV.get('RemoveTurnstile')||''; + const removeTurnstile = await KV.get('RemoveTurnstile')||''; return ` @@ -2231,7 +2231,7 @@ async function saveUsageLogs(usersData) { async function getTableUserHTML() { - const removeTurnstile = KV.get('RemoveTurnstile')||''; + const removeTurnstile = await KV.get('RemoveTurnstile')||''; const turnstileSiteKey = await KV.get('TurnstileSiteKey'); return ` @@ -3107,7 +3107,7 @@ async function getLoginHTML(setan) { const turnstileSiteKey=await KV.get('TurnstileSiteKey'); const websiteName = await KV.get('WebName') || 'Haibara AI'; const logourl = await KV.get('LogoURL') || logo; - const removeTurnstile = KV.get('RemoveTurnstile')||''; + const removeTurnstile = await KV.get('RemoveTurnstile')||''; const commonHTML = `