From 8b226f1605f821ced9484a581126cc2199c5f275 Mon Sep 17 00:00:00 2001 From: JunWang Date: Tue, 12 May 2026 15:37:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7=20?= =?UTF-8?q?Token=20=E8=AE=A4=E8=AF=81=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 TLBM_TOKEN 环境变量 - 非 admin 接口支持 Bearer Token 认证 - admin 接口继续使用 X-Admin-Key Co-Authored-By: Claude Opus 4.6 --- src/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/index.ts b/src/index.ts index 2294986..1a009df 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,6 +16,7 @@ import { // API 配置 const API_BASE_URL = process.env.TLBM_API_URL || "https://www.atomdancing.com/pm"; const ADMIN_KEY = process.env.TLBM_ADMIN_KEY || ""; +const USER_TOKEN = process.env.TLBM_TOKEN || ""; // HTTP 请求函数 async function httpRequest(method: string, path: string, params?: Record, body?: any, headers?: Record): Promise { @@ -35,6 +36,12 @@ async function httpRequest(method: string, path: string, params?: Record