From 08161c64d4051fe4b48af33886a4eb5b7e940d2d Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 24 Feb 2026 02:11:42 -0800 Subject: [PATCH] =?UTF-8?q?fix(snapshot):=20API=20=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E8=A1=A5=E4=B8=8A=20progressMsg=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit toSnapshotResponse 手动映射字段时遗漏了 progressMsg, 导致前端轮询拿不到 MB 进度消息。 Co-Authored-By: Claude Opus 4.6 --- .../services/snapshot-service/src/api/dto/snapshot.response.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/services/snapshot-service/src/api/dto/snapshot.response.ts b/backend/services/snapshot-service/src/api/dto/snapshot.response.ts index 21bd2ac6..a0587c85 100644 --- a/backend/services/snapshot-service/src/api/dto/snapshot.response.ts +++ b/backend/services/snapshot-service/src/api/dto/snapshot.response.ts @@ -5,6 +5,7 @@ export class SnapshotDetailResponse { @ApiProperty() target: string; @ApiProperty() status: string; @ApiProperty() progress: number; + @ApiProperty({ required: false }) progressMsg: string | null; @ApiProperty() fileSize: string; @ApiProperty() fileName: string | null; @ApiProperty() error: string | null; @@ -52,6 +53,7 @@ export function toSnapshotResponse(task: any): SnapshotTaskResponse { target: d.target, status: d.status, progress: d.progress, + progressMsg: d.progressMsg ?? null, fileSize: d.fileSize.toString(), fileName: d.fileName, error: d.error,