[PR #188] [MERGED] feat(api-potluck): 添加 API 大锅饭插件功能(彩蛋) #288

Closed
opened 2026-02-27 07:18:49 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/justlovemaki/AIClient-2-API/pull/188
Author: @leonaii
Created: 1/8/2026
Status: Merged
Merged: 1/8/2026
Merged by: @justlovemaki

Base: mainHead: main


📝 Commits (1)

  • 8dd905c feat(api-potluck): 添加 API 大锅饭插件功能(彩蛋)

📊 Changes

8 files changed (+1068 additions, -4 deletions)

View changed files

📝 .gitignore (+2 -1)
src/api-potluck/api-routes.js (+277 -0)
src/api-potluck/index.js (+33 -0)
src/api-potluck/key-manager.js (+297 -0)
src/api-potluck/middleware.js (+152 -0)
📝 src/common.js (+9 -0)
📝 src/request-handler.js (+22 -3)
static/potluck.html (+276 -0)

📄 Description

功能描述

添加 "API 大锅饭" 功能模块,支持生成带配额限制的 API Key,方便分发给他人使用。

主要特性

  • 自动生成 maki_ 前缀的 API Key
  • 每个 Key 独立的每日调用限额(默认 1000 次)
  • 实时使用统计(今日/累计)
  • Key 管理:启用/禁用、重置次数、修改限额、删除
  • 独立管理页面:/potluck.html
  • 支持搜索和排序
  • 内存缓存 + 定期持久化,支持高并发

文件变更

新增文件(无侵入):

  • src/api-potluck/ - 后端模块
  • static/potluck.html - 管理页面
  • configs/api-potluck-keys.json - 数据存储

修改文件(最小侵入,已用注释标记):

  • src/request-handler.js - 添加路由和认证中间件
  • src/common.js - 添加使用计数

所有修改点均用 // ============== API 大锅饭插件 ============== 标记,便于合并。


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/justlovemaki/AIClient-2-API/pull/188 **Author:** [@leonaii](https://github.com/leonaii) **Created:** 1/8/2026 **Status:** ✅ Merged **Merged:** 1/8/2026 **Merged by:** [@justlovemaki](https://github.com/justlovemaki) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`8dd905c`](https://github.com/justlovemaki/AIClient-2-API/commit/8dd905cc52d3ff45c9a0347343033b91cd668db8) feat(api-potluck): 添加 API 大锅饭插件功能(彩蛋) ### 📊 Changes **8 files changed** (+1068 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+2 -1) ➕ `src/api-potluck/api-routes.js` (+277 -0) ➕ `src/api-potluck/index.js` (+33 -0) ➕ `src/api-potluck/key-manager.js` (+297 -0) ➕ `src/api-potluck/middleware.js` (+152 -0) 📝 `src/common.js` (+9 -0) 📝 `src/request-handler.js` (+22 -3) ➕ `static/potluck.html` (+276 -0) </details> ### 📄 Description ## 功能描述 添加 "API 大锅饭" 功能模块,支持生成带配额限制的 API Key,方便分发给他人使用。 ## 主要特性 - 自动生成 `maki_` 前缀的 API Key - 每个 Key 独立的每日调用限额(默认 1000 次) - 实时使用统计(今日/累计) - Key 管理:启用/禁用、重置次数、修改限额、删除 - 独立管理页面:`/potluck.html` - 支持搜索和排序 - 内存缓存 + 定期持久化,支持高并发 ## 文件变更 **新增文件(无侵入):** - `src/api-potluck/` - 后端模块 - `static/potluck.html` - 管理页面 - `configs/api-potluck-keys.json` - 数据存储 **修改文件(最小侵入,已用注释标记):** - `src/request-handler.js` - 添加路由和认证中间件 - `src/common.js` - 添加使用计数 所有修改点均用 `// ============== API 大锅饭插件 ==============` 标记,便于合并。 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 07:18:49 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AIClient-2-API-justlovemaki#288
No description provided.