From b8467638a2b8f54b42642d6c39f741b46a77a955 Mon Sep 17 00:00:00 2001 From: argszero Date: Mon, 19 Oct 2026 21:41:10 +0800 Subject: [PATCH] docs(architecture): list the verbs the named paths actually serve MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The §6 roster names a path but listed fewer methods than that path serves, so a reader taking the verb list as complete could not rename an API key, could not see where a sharing is edited, and would not know an admin can assign a user to a department. The sibling departments line already spells out its :id sub-path with its verbs; these three now follow the same shape. Verified against router() in src/routes/mod.rs. --- docs/architecture.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/architecture.md b/docs/architecture.md index ad4ab08..07ba159 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -81,12 +81,12 @@ - `GET /healthz` — 健康检查(返回版本号) - `POST /api/auth/register` / `login` / `verify` / `resend-code` / `forgot-password` / `reset-password` / `change-password` - `GET /api/me` — 当前用户 -- `POST/GET/DELETE /api/api-keys` — 分发 key 生成 / 列表 / 撤销 +- `POST/GET /api/api-keys` + `PATCH/DELETE /api/api-keys/:id` — 分发 key 生成 / 列表 / 改名 / 撤销 - `GET /api/models` — 模型列表(含可用 key 与价格) - `POST /v1/chat/completions` / `/v1/responses` / `/anthropic/v1/messages` — 网关(非流式 + SSE) - `GET /api/wallet` / `/api/transactions` / `/api/dashboard` — 钱包 / 交易(summary + 明细)/ 仪表盘 -- `POST/GET/PATCH /api/sharings` — key 上架 / 列表 / 编辑(PATCH 部分更新:暂停 · 恢复 · 下线,以及上架时的全部设置) -- `POST /api/admin/credits` / `GET /api/admin/users` / `usage` / `models` CRUD — 管理(role=admin) +- `POST/GET /api/sharings` + `PATCH /api/sharings/:id` — key 上架 / 列表 / 编辑(PATCH 部分更新:暂停 · 恢复 · 下线,以及上架时的全部设置) +- `POST /api/admin/credits` / `GET /api/admin/users` + `PATCH /api/admin/users/:id`(仅改部门) / `usage` / `models` CRUD — 管理(role=admin) - `GET/POST /api/admin/departments` + `PATCH/DELETE /api/admin/departments/:id` — 部门管理(role=admin) - `POST/GET /api/raise-requests` + `POST /api/admin/raise-requests/:id/{approve,reject}` — 加额申请 / 审批 - `GET /api/ops/runtime` / `users`,`POST /api/ops/credits` — 运营者视图(role=ops)