Skip to content

Commit

Permalink
await promise....
Browse files Browse the repository at this point in the history
  • Loading branch information
overthestream committed Aug 25, 2024
1 parent ebb7831 commit 3a735ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/domain/hotTopic/hotTopic.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class HotTopicRepository {
take: 3,
});
const dtos = [];
Promise.all(
await Promise.all(
questions.map(async (q) => {
const likes = await this.hotTopicLikeRepository.count({
where: { hotTopicId: q.id },
Expand Down Expand Up @@ -118,7 +118,7 @@ export class HotTopicRepository {
take: pageSize,
});
const dtos = [];
Promise.all(
await Promise.all(
questions.map(async (q) => {
const likes = await this.hotTopicLikeRepository.count({
where: { hotTopicId: q.id },
Expand Down

0 comments on commit 3a735ee

Please sign in to comment.