Question from the Nest.js test

What is the role of the `@Body()` decorator in this NestJS code snippet?

Easy

Consider the following code snippet:

@Post()
async create(@Body() createCatDto: CreateCatDto) {
  this.catsService.create(createCatDto);
}

What is the role of the @Body() decorator in this extract?

Author: AxelStatus: PublishedQuestion passed 347 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!