Put in order · NestJS course · Module 1: NestJS Basics

@Post Decorator Syntax

Arrange the elements of the POST method in a NestJS controller:

Items to put in order

  • @Post()
  • @Body() data)
  • create(
  • { }
Show the answer

Correct order:

  1. @Post()
  2. create(
  3. @Body() data)
  4. { }