根因:ValidationPipe配置了whitelist+forbidNonWhitelisted,但DTO类的属性 没有任何class-validator装饰器,导致所有请求体属性被当作非白名单属性直接 返回Bad Request,请求根本未到达业务逻辑层。 修复:为SetTradePasswordDto、ChangeTradePasswordDto、VerifyTradePasswordDto 添加@IsString()和@IsNotEmpty()装饰器。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| application | ||
| domain | ||
| infrastructure | ||
| shared | ||
| app.module.ts | ||
| main.ts | ||