불필요한 정보 삭제
This commit is contained in:
parent
f341c9d8bb
commit
87d2b03329
@ -20,7 +20,7 @@ router.get("/", async function (req, res, next) {
|
||||
|
||||
// 동일한 rating을 가진 유저들만 필터링
|
||||
var sameRatingUsers = await users
|
||||
.find({ rating: userRating }, { projection: { username: 1, nickname: 1, score: 1, win: 1, lose: 1, profileImageIndex:1, rating: 1 } })
|
||||
.find({ rating: userRating }, { projection: { nickname: 1, score: 1, win: 1, lose: 1, profileImageIndex:1, rating: 1 } })
|
||||
.toArray();
|
||||
|
||||
// 승률 계산 및 정렬
|
||||
@ -29,7 +29,6 @@ router.get("/", async function (req, res, next) {
|
||||
const winRate = totalGames > 0 ? ((user.win || 0) / totalGames * 100) : 0;
|
||||
|
||||
return {
|
||||
username: user.username,
|
||||
nickname: user.nickname,
|
||||
score: user.score || 0,
|
||||
win: user.win || 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user