Skip to content

Commit

Permalink
fix(friends-service): improve logic
Browse files Browse the repository at this point in the history
  • Loading branch information
wibus-wee committed May 5, 2023
1 parent 3736452 commit 100f9b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/friends-service/src/friends-service.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class FriendsService {
*/
async getAllByMaster(status?: FriendStatus, all?: boolean) {
return this.friendsModel.find({
status: all ? undefined : status || status === 0 ? status : FriendStatus.Approved,
status: all ? undefined : status ?? FriendStatus.Approved,
});
}

Expand Down

0 comments on commit 100f9b4

Please sign in to comment.