What is the purpose of a Data Transfer Object in NestJS?
问题 Im struggling with a problem. Im following the documentation of NestJS. The back-end framework for NodeJS. The documentation mentions a DTO (Data Transfer Object). I created a DTO for creating a user: export class CreateUserDto { readonly email: string; readonly password: string; } In combination with this: @Post('create') createUser(@Body() userData: CreateUserDto): User { return this.usersService.createUser(userData); } For some reason, I am able to make a post request to this route with