@@ -60,6 +60,9 @@ export class PostService {
60
60
)
61
61
. leftJoinAndSelect ( 'post.postLikes' , 'postLike' )
62
62
. where ( 'post.status = :status' , { status : 'activated' } )
63
+ . andWhere ( 'post.user.id NOT IN (:currentUserId)' , {
64
+ currentUserId : [ currentUserId ] ,
65
+ } )
63
66
. andWhere (
64
67
blockedUserIds . length > 0
65
68
? 'post.user.id NOT IN (:...blockedUserIds)'
@@ -170,12 +173,12 @@ export class PostService {
170
173
isRepresentative : post . isRepresentative ,
171
174
isPostLike : this . checkIsPostLiked ( post , currentUserId ) ,
172
175
isPostComment : this . checkIsPostCommented ( post , currentUserId ) ,
173
- likeCount : post . postLikes . length ,
174
- commentCount : post . postComments . length ,
176
+ postLikesCount : post . postLikes . length ,
177
+ postCommentsCount : post . postComments . length ,
175
178
} ) ) ,
176
- totalComments : this . calculateTotalComments ( posts ) ,
177
- totalPosts : posts . length ,
178
- totalLikes : this . calculateTotalLikes ( posts ) ,
179
+ totalPostCommentsCount : this . calculateTotalComments ( posts ) ,
180
+ totalPostsCount : posts . length ,
181
+ totalPostLikesCount : this . calculateTotalLikes ( posts ) ,
179
182
} ;
180
183
}
181
184
@@ -191,10 +194,10 @@ export class PostService {
191
194
imageUrl : post . postImages [ 0 ] ?. url ,
192
195
isRepresentative : post . isRepresentative ,
193
196
isPostLike : this . checkIsPostLiked ( post , currentUserId ) ,
194
- likeCount : post . postLikes . length ,
197
+ postLikesCount : post . postLikes . length ,
195
198
} ) ) ,
196
- totalPosts : posts . length ,
197
- totalLikes : this . calculateTotalLikes ( posts ) ,
199
+ totalPostsCount : posts . length ,
200
+ totalPostLikesCount : this . calculateTotalLikes ( posts ) ,
198
201
} ;
199
202
}
200
203
@@ -460,8 +463,8 @@ export class PostService {
460
463
modelNumber : postClothing . clothing . modelNumber ,
461
464
url : postClothing . clothing . url ,
462
465
} ) ) ,
463
- likeCount : post . postLikes . length ,
464
- commentCount : post . postComments . length ,
466
+ postLikesCount : post . postLikes . length ,
467
+ postCommentsCount : post . postComments . length ,
465
468
isPostLike : this . checkIsPostLiked ( post , currentUserId ) ,
466
469
createdAt : dayjs ( post . createdAt ) . format ( 'YYYY-MM-DDTHH:mm:ssZ' ) ,
467
470
updatedAt : dayjs ( post . updatedAt ) . format ( 'YYYY-MM-DDTHH:mm:ssZ' ) ,
0 commit comments