修改一些小细节

This commit is contained in:
huangxd- committed 2025-09-13 18:44:21 +08:00
1 parent f042d444f8
commit a7d6414903
3 files changed
+8 -8

No files matched your search

+5 -2
View File
@@ -1,6 +1,6 @@
# 简单 弹幕 API 服务器
# MuMu 弹幕 API 服务器
一个基于 js 的弹幕 API 服务器,兼容弹弹play的搜索、详情查询和弹幕获取功能,以及日志记录。
一个人人都能部署的基于 js 的弹幕 API 服务器,兼容弹弹play的搜索、详情查询和弹幕获取功能,并提供日志记录,支持vercel/cloudflare/docker/claw等部署方式。
## 功能
- **API 接口**:
@@ -105,6 +105,9 @@
3. 添加 `TOKEN` 环境变量,输入你的 API 令牌值。
4. 保存并部署。
### 手动部署
创建一个worker,并将danmu_api/worker.js里的代码直接拷贝到你创建的worker.js里,并点击部署。
## 项目结构
```
danmu_api/
+2 -1
View File
@@ -687,8 +687,9 @@ async function handleRequest(req, env) {
if (path === "/" && method === "GET") {
log("log", "Accessed homepage with repository information");
return jsonResponse({
message: "Welcome to the Danmu API server",
message: "Welcome to the MuMu Danmu API server",
repository: "https://github.com/huangxd-/danmu_api.git",
description: "一个人人都能部署的基于 js 的弹幕 API 服务器,兼容弹弹play的搜索、详情查询和弹幕获取功能,并提供日志记录,支持vercel/cloudflare/docker/claw等部署方式",
notice: "本项目仅为个人爱好开发,代码开源。如有任何侵权行为,请联系本人删除。"
});
}
+1 -5
View File
@@ -32,11 +32,7 @@ test('worker.js API endpoints', async (t) => {
assert.equal(res.status, 200);
assert.equal(res.headers.get('Content-Type'), 'application/json');
assert.deepEqual(body, {
message: 'Welcome to the Danmu API server',
repository: 'https://github.com/huangxd-/danmu_api.git',
notice: '本项目仅为个人爱好开发,代码开源。如有任何侵权行为,请联系本人删除。'
});
assert.deepEqual(body.message, 'Welcome to the MuMu Danmu API server');
});
await t.test('GET tencent danmu', async () => {