Skip to content

Commit

Permalink
πŸ› :: follow order reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonchaegeon committed May 26, 2022
1 parent b090ddb commit 2555318
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/infrastructure/repositories/user.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ export class DatabaseUserRepository implements UserRepository {
return subQuery
.select('COUNT(1)')
.from('user', 'user')
.innerJoin('user.follower', 'follower')
.innerJoin('user.follower', 'following')
.where('user.id = :user_id', { user_id: userId });
}, 'followerCnt')
.addSelect((subQuery) => {
return subQuery
.select('COUNT(1)')
.from('user', 'user')
.innerJoin('user.following', 'following')
.innerJoin('user.following', 'follower')
.where('user.id = :user_id', { user_id: userId });
}, 'followingCnt')
.where('user.id = :user_id', { user_id: userId })
Expand Down

0 comments on commit 2555318

Please sign in to comment.