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,
|
HttpStatus,
|
||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { ApiTags, ApiOperation, ApiResponse, ApiQuery } from '@nestjs/swagger';
|
import { ApiTags, ApiOperation, ApiResponse, ApiQuery } from '@nestjs/swagger';
|
||||||
|
import { IsBoolean, IsOptional, IsString } from 'class-validator';
|
||||||
import { PrePlantingConfigService } from './pre-planting-config.service';
|
import { PrePlantingConfigService } from './pre-planting-config.service';
|
||||||
import { PrePlantingProxyService } from './pre-planting-proxy.service';
|
import { PrePlantingProxyService } from './pre-planting-proxy.service';
|
||||||
|
|
||||||
class UpdatePrePlantingConfigDto {
|
class UpdatePrePlantingConfigDto {
|
||||||
|
@IsBoolean()
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
updatedBy?: string;
|
updatedBy?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
class TogglePrePlantingConfigDto {
|
class TogglePrePlantingConfigDto {
|
||||||
|
@IsBoolean()
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue