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:
parent
35fc957eaf
commit
f595c6f26d
|
|
@ -26,9 +26,10 @@ export class UploadVersionDto {
|
||||||
@IsString()
|
@IsString()
|
||||||
buildNumber?: string
|
buildNumber?: string
|
||||||
|
|
||||||
@ApiProperty({ description: '更新日志' })
|
@ApiPropertyOptional({ description: '更新日志' })
|
||||||
|
@IsOptional()
|
||||||
@IsString()
|
@IsString()
|
||||||
changelog: string
|
changelog?: string
|
||||||
|
|
||||||
@ApiProperty({ description: '是否强制更新', default: false })
|
@ApiProperty({ description: '是否强制更新', default: false })
|
||||||
@Transform(({ value }) => value === 'true' || value === true)
|
@Transform(({ value }) => value === 'true' || value === true)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue