From 56cf76ee9d8d2adb46c366c9543d0dbb5fad4090 Mon Sep 17 00:00:00 2001 From: AiHaibara <166741903+jyx04@users.noreply.github.com> Date: Fri, 21 Jun 2024 20:00:14 +0800 Subject: [PATCH] Update _worker.js --- _worker.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/_worker.js b/_worker.js index 769a40f..fd3e6f8 100644 --- a/_worker.js +++ b/_worker.js @@ -323,6 +323,18 @@ if (cookies) { return response; } +if (url.pathname === '/backend-api/accounts/check') { +const data = await response.json(); +for (const accountId in data.accounts) { +if (data.accounts[accountId].account) { +data.accounts[accountId].account.name = ${chatusername} [${aian}]; +} +} +return new Response(JSON.stringify(data), { +status: response.status, +headers: response.headers +}); +} //初始化信息填入功能 async function handleInitialRequest(request) {