Merge branch 'DO-22-서버-코인-관리-api-추가'
This commit is contained in:
commit
5deb1bced4
@ -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) => {
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user