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() target: string;
|
||||||
@ApiProperty() status: string;
|
@ApiProperty() status: string;
|
||||||
@ApiProperty() progress: number;
|
@ApiProperty() progress: number;
|
||||||
|
@ApiProperty({ required: false }) progressMsg: string | null;
|
||||||
@ApiProperty() fileSize: string;
|
@ApiProperty() fileSize: string;
|
||||||
@ApiProperty() fileName: string | null;
|
@ApiProperty() fileName: string | null;
|
||||||
@ApiProperty() error: string | null;
|
@ApiProperty() error: string | null;
|
||||||
|
|
@ -52,6 +53,7 @@ export function toSnapshotResponse(task: any): SnapshotTaskResponse {
|
||||||
target: d.target,
|
target: d.target,
|
||||||
status: d.status,
|
status: d.status,
|
||||||
progress: d.progress,
|
progress: d.progress,
|
||||||
|
progressMsg: d.progressMsg ?? null,
|
||||||
fileSize: d.fileSize.toString(),
|
fileSize: d.fileSize.toString(),
|
||||||
fileName: d.fileName,
|
fileName: d.fileName,
|
||||||
error: d.error,
|
error: d.error,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue