fix(snapshot): API 响应补上 progressMsg 字段
toSnapshotResponse 手动映射字段时遗漏了 progressMsg, 导致前端轮询拿不到 MB 进度消息。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8855491637
commit
08161c64d4
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue