fix(admin): 预种开关DTO添加class-validator装饰器,修复400错误
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
37a5610d74
commit
8d7fd68509
|
|
@ -9,15 +9,21 @@ import {
|
|||
HttpStatus,
|
||||
} from '@nestjs/common';
|
||||
import { ApiTags, ApiOperation, ApiResponse, ApiQuery } from '@nestjs/swagger';
|
||||
import { IsBoolean, IsOptional, IsString } from 'class-validator';
|
||||
import { PrePlantingConfigService } from './pre-planting-config.service';
|
||||
import { PrePlantingProxyService } from './pre-planting-proxy.service';
|
||||
|
||||
class UpdatePrePlantingConfigDto {
|
||||
@IsBoolean()
|
||||
isActive: boolean;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
updatedBy?: string;
|
||||
}
|
||||
|
||||
class TogglePrePlantingConfigDto {
|
||||
@IsBoolean()
|
||||
isActive: boolean;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue