Skip to content

Commit

Permalink
Re-add the sample instead of always returning the first player
Browse files Browse the repository at this point in the history
  • Loading branch information
sarimash committed Jun 19, 2023
1 parent 5d4f558 commit 12123bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/src/modules/player/player.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ export class PlayerService {
userId: { $ne: excludeUserId },
},
},
{
$sample: { size: 1 },
},
]);

return found[0];
Expand Down

0 comments on commit 12123bb

Please sign in to comment.