feat: 移除图片生成记录中的尺寸字段,调整归档逻辑以支持异步处理

This commit is contained in:
2026-04-26 01:37:01 +08:00
parent 4c58f409e9
commit 818cf317ab
9 changed files with 115 additions and 85 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
// server/api/images/history/[id].get.ts - 生图历史详情接口:返回当前用户单条记录和完整响应
// server/api/images/history/[id].get.ts - 生图历史详情接口:返回当前用户单条记录的展示字段与归档状态
import type { IImageHistoryDetail } from "#shared/types/openai";
import {
clearNewApiAuthCookies,
@@ -19,7 +19,7 @@ import {
* 1. 从 httpOnly cookie 读取当前用户 ID。
* 2. 校验路由参数 id 必须是数字,并转成 BigInt 查询。
* 3. 只允许读取当前用户、未软删除的记录。
* 4. 返回详情时包含完整上游响应和 Lsky 响应,便于排查单次生图问题
* 4. 详情接口继续隐藏内部响应,只返回页面展示和归档状态所需字段
*/
export default defineEventHandler(async (event) => {
const logger = createApiLogger("images.history.detail");