@@ -18,12 +18,12 @@ import {
18
18
import { CreateCommentDto } from './dtos/create-comment.dto' ;
19
19
import { Request } from 'express' ;
20
20
import { BaseResponse } from 'src/common/response/dto' ;
21
- import { PostService } from 'src/post/post.service' ;
22
21
import { AuthGuard } from 'src/auth/guards/jwt.auth.guard' ;
23
22
import { ApiBearerAuth , ApiTags } from '@nestjs/swagger' ;
24
23
import { PostComment } from 'src/common/entities/post-comment.entity' ;
25
24
import { GetCommentsDto } from './dtos/get-comment.dto' ;
26
25
import dayjs from 'dayjs' ;
26
+ import { UserBlockService } from 'src/user-block/user-block.service' ;
27
27
28
28
@ApiBearerAuth ( 'Authorization' )
29
29
@Controller ( 'post-comment' )
@@ -32,7 +32,7 @@ import dayjs from 'dayjs';
32
32
export class PostCommentController {
33
33
constructor (
34
34
private readonly postCommentService : PostCommentService ,
35
- private readonly postService : PostService ,
35
+ private readonly userBlockService : UserBlockService ,
36
36
) { }
37
37
38
38
@Post ( )
@@ -61,9 +61,12 @@ export class PostCommentController {
61
61
) : Promise < BaseResponse < GetCommentsDto > > {
62
62
const currentUserId = req . user . id ;
63
63
64
+ const blockedUserIds : number [ ] =
65
+ await this . userBlockService . getBlockedUserIds ( currentUserId ) ;
66
+
64
67
const comments = await this . postCommentService . getPostComments (
65
68
postId ,
66
- currentUserId ,
69
+ blockedUserIds ,
67
70
) ;
68
71
69
72
const commenteResponse : GetCommentsDto = {
0 commit comments