Skip to content

Commit 6e155c5

Browse files
authored
Merge pull request #67 from oodd-team/OD-139
feat: 게시글 리스트 조회 변경
2 parents db168b9 + 1167da5 commit 6e155c5

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/post/post.service.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ export class PostService {
8383
: '1=1',
8484
{ blockedUserIds },
8585
)
86-
.orderBy('post.createdAt', 'DESC')
86+
.orderBy('post.createdAt', 'DESC');
87+
88+
const total = await queryBuilder.getCount();
89+
90+
queryBuilder
8791
.take(pageOptionsDto.take)
8892
.skip((pageOptionsDto.page - 1) * pageOptionsDto.take);
89-
9093
const posts = await queryBuilder.getMany();
91-
console.log(posts);
92-
93-
const total = await queryBuilder.getCount();
9494

9595
const currentUserMatchings =
9696
await this.matchingService.getMatchingsByCurrentId(currentUserId);

0 commit comments

Comments
 (0)