diff --git a/src/posts/posts.controller.ts b/src/posts/posts.controller.ts index 4a7a5af..3576975 100644 --- a/src/posts/posts.controller.ts +++ b/src/posts/posts.controller.ts @@ -1,4 +1,4 @@ -import { Controller, Get, Req, Query, Headers, Param } from '@nestjs/common'; +import { Controller, Get, Post, Req, Query, Headers, Param, Body } from '@nestjs/common'; @Controller('posts') export class PostsController { @@ -19,4 +19,10 @@ export class PostsController { title: `Post ${params.id}` } } + + @Post() + store(@Body() body) { + console.log(body) + return body + } }