Skip to content

Commit

Permalink
유저 정보 조회 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
wook-hyung committed Dec 16, 2023
1 parent 159157a commit 3488ad9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion models/userModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const userModel = {
const connection = await pool.getConnection();

try {
const [rows, fields] = await connection.query('SELECT * FROM member WHERE id = ?', [id]);
const [rows] = await connection.query('SELECT * FROM member WHERE id = ?', [id]);

return rows;
} finally {
connection.release();
Expand Down
6 changes: 3 additions & 3 deletions services/challengeService.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ const challengeService = {
memberId,
});

console.log(result);

return {
success: true,
data: result,
Expand All @@ -190,10 +188,12 @@ const challengeService = {
challengeModel.findCertificatedCountByMemberId({ memberId }),
]);

console.log(user);

return {
success: true,
data: {
champion: user.champion,
champion: user[0].champion,
explorationCount: explorationCount[0]['COUNT(DISTINCT cT.id)'],
certificatedCount: certificatedCount[0]['COUNT(DISTINCT cT.id)'],
},
Expand Down

0 comments on commit 3488ad9

Please sign in to comment.