fix(mining-admin): 将 upload DTO 的 changelog 改为可选

前端 upload-modal 在用户未填写更新日志时不发送 changelog 字段,
导致 DTO 校验失败返回 400。将 changelog 改为 @IsOptional(),
与前端行为一致。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-29 13:13:57 -08:00
parent 35fc957eaf
commit f595c6f26d
1 changed files with 3 additions and 2 deletions

View File

@ -26,9 +26,10 @@ export class UploadVersionDto {
@IsString()
buildNumber?: string
@ApiProperty({ description: '更新日志' })
@ApiPropertyOptional({ description: '更新日志' })
@IsOptional()
@IsString()
changelog: string
changelog?: string
@ApiProperty({ description: '是否强制更新', default: false })
@Transform(({ value }) => value === 'true' || value === true)