11import { Body , Controller , Delete , Get , Param , Post , Put , Query } from '@nestjs/common' ;
2- import { ApiBearerAuth , ApiOperation , ApiResponse , ApiTags } from '@nestjs/swagger' ;
2+ import { ApiBearerAuth , ApiBody , ApiOperation , ApiResponse , ApiTags } from '@nestjs/swagger' ;
33import { User } from '../user/user.decorator' ;
44import { IArticleRO , IArticlesRO , ICommentsRO } from './article.interface' ;
55import { ArticleService } from './article.service' ;
@@ -38,6 +38,7 @@ export class ArticleController {
3838 }
3939
4040 @ApiOperation ( { summary : 'Create article' } )
41+ @ApiBody ( { type : CreateArticleDto } )
4142 @ApiResponse ( { status : 201 , description : 'The article has been successfully created.' } )
4243 @ApiResponse ( { status : 403 , description : 'Forbidden.' } )
4344 @Post ( )
@@ -46,6 +47,7 @@ export class ArticleController {
4647 }
4748
4849 @ApiOperation ( { summary : 'Update article' } )
50+ @ApiBody ( { type : CreateArticleDto } )
4951 @ApiResponse ( { status : 201 , description : 'The article has been successfully updated.' } )
5052 @ApiResponse ( { status : 403 , description : 'Forbidden.' } )
5153 @Put ( ':slug' )
@@ -63,6 +65,7 @@ export class ArticleController {
6365 }
6466
6567 @ApiOperation ( { summary : 'Create comment' } )
68+ @ApiBody ( { type : CreateCommentDto } )
6669 @ApiResponse ( { status : 201 , description : 'The comment has been successfully created.' } )
6770 @ApiResponse ( { status : 403 , description : 'Forbidden.' } )
6871 @Post ( ':slug/comments' )
0 commit comments