diff --git a/routes/leaderboard.js b/routes/leaderboard.js index 9e4fbb0..4cfe0dd 100644 --- a/routes/leaderboard.js +++ b/routes/leaderboard.js @@ -35,7 +35,7 @@ router.get("/", async function (req, res, next) { lose: user.lose || 0, winRate: parseFloat(winRate.toFixed(2)), // 소수점 2자리까지 표시 totalGames: totalGames, - imageindex: user.profileImageIndex, + imageIndex: user.profileImageIndex, }; }) .sort((a, b) => { diff --git a/routes/users.js b/routes/users.js index 85c06a5..4099975 100644 --- a/routes/users.js +++ b/routes/users.js @@ -22,7 +22,7 @@ router.post('/signup', async function (req, res, next) { var email = req.body.email; var password = req.body.password; var nickname = req.body.nickname; - var profileImageIndex = req.body.imageindex ?? 0; + var profileImageIndex = req.body.imageIndex ?? 0; // 입력값 검증 if( !email || !password || !nickname ){ @@ -95,7 +95,7 @@ router.post("/signin", async function (req, res, next) { res.json({ result: ResponseType.SUCCESS, - imageindex: existingUser.imageindex, + imageIndex: existingUser.imageIndex, rating: existingUser.rating, score: existingUser.score, coins: existingUser.coins, @@ -240,7 +240,7 @@ router.get("/get-info", async function (req, res, next) { nickname: user.nickname, rating: user.rating, score: Number(user.score) || 0, - imageindex: Number(user.profileImageIndex) + imageIndex: Number(user.profileImageIndex) }) } catch (err) {