Skip to content

Commit

Permalink
Merge pull request #410 from sparcs-kaist/#399.1-logininfo
Browse files Browse the repository at this point in the history
#399.1 `logininfo` API에 `phoneNumber` 추가
  • Loading branch information
14KGun authored Sep 27, 2023
2 parents f6b55d0 + 18f65b9 commit 5e34999
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/routes/docs/logininfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ const logininfoDocs = {
withdraw: {
type: "boolean",
},
phoneNumber: {
type: "string",
description: "사용자 전화번호",
},
ban: {
type: "boolean",
},
Expand Down
3 changes: 2 additions & 1 deletion src/services/logininfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const logininfoHandler = async (req, res) => {

const userDetail = await userModel.findOne(
{ id: user.id },
"_id name nickname id withdraw ban joinat agreeOnTermsOfService subinfo email profileImageUrl account"
"_id name nickname id withdraw phoneNumber ban joinat agreeOnTermsOfService subinfo email profileImageUrl account"
);

res.json({
Expand All @@ -18,6 +18,7 @@ const logininfoHandler = async (req, res) => {
name: userDetail.name,
nickname: userDetail.nickname,
withdraw: userDetail.withdraw,
phoneNumber: userDetail.phoneNumber,
ban: userDetail.ban,
joinat: userDetail.joinat,
agreeOnTermsOfService: userDetail.agreeOnTermsOfService,
Expand Down

0 comments on commit 5e34999

Please sign in to comment.