@@ -15,10 +15,7 @@ import {
15
15
GetPostCommentsSwagger ,
16
16
} from './post-comment.swagger' ;
17
17
import { ApiTags } from '@nestjs/swagger' ;
18
- import {
19
- CreateCommentDto ,
20
- CreateCommentResponseDto ,
21
- } from './dtos/create-comment.dto' ;
18
+ import { CreateCommentDto } from './dtos/create-comment.dto' ;
22
19
import { Request } from 'express' ;
23
20
import { BaseResponse } from 'src/common/response/dto' ;
24
21
import { PostService } from 'src/post/post.service' ;
@@ -39,7 +36,7 @@ export class PostCommentController {
39
36
@Query ( 'postId' ) postId : number ,
40
37
@Body ( ) createCommentDto : CreateCommentDto ,
41
38
@Req ( ) req : Request ,
42
- ) : Promise < BaseResponse < CreateCommentResponseDto > > {
39
+ ) : Promise < BaseResponse < any > > {
43
40
const currentUserId = req . user . userId ;
44
41
45
42
await this . postService . validatePost ( postId ) ;
@@ -50,14 +47,7 @@ export class PostCommentController {
50
47
createCommentDto ,
51
48
) ;
52
49
53
- const responseData : CreateCommentResponseDto = {
54
- content : postComment . content ,
55
- userId : currentUserId ,
56
- postId : postId ,
57
- createdAt : postComment . createdAt ,
58
- } ;
59
-
60
- return new BaseResponse ( true , '댓글 작성 성공' , responseData ) ;
50
+ return new BaseResponse ( true , '댓글 작성 성공' , postComment ) ;
61
51
}
62
52
63
53
@Get ( )
0 commit comments