Skip to content

Commit

Permalink
imageUrl로 모두 통일
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkJunGyu26 committed Dec 2, 2023
1 parent eb7cfe1 commit 1ced3bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/config/swagger/mypage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tags:
result:
userName: "박준규"
jobName: "백엔드 개발자"
userimageUrl: "https://kau-sanhak-qj.s3.ap-northeast-2.amazonaws.com/profile/1700730095307-KakaoTalk_20231118_152522010.jpg"
imageUrl: "https://kau-sanhak-qj.s3.ap-northeast-2.amazonaws.com/profile/1700730095307-KakaoTalk_20231118_152522010.jpg"
'3000':
description: 토큰 검증 실패
content:
Expand Down Expand Up @@ -160,7 +160,7 @@ tags:
result:
nickname: "박준규"
jobName: "개발자"
image: null
imageUrl: null
'3000':
description: 토큰 검증 실패
content:
Expand Down Expand Up @@ -215,7 +215,7 @@ tags:
result:
nickname: "박준규"
jobName: "개발자"
image: "https://example.com/profile-image.jpg"
imageUrl: "https://example.com/profile-image.jpg"
'3000':
description: 토큰 검증 실패
content:
Expand Down
6 changes: 4 additions & 2 deletions src/controller/mypageController.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ exports.getMypage = async (req, res) => {
// 이미지 파일
const userimageUrl = await mypageProvider.getUserImage(userIdx);

const imageUrl = userimageUrl[0].imageUrl;
const userName = userInfo[0].userName;
const jobName = userInfo[0].jobName;

return res.send(response(baseResponse.SUCCESS, { userName, jobName, userimageUrl } ));
return res.send(response(baseResponse.SUCCESS, { userName, jobName, imageUrl } ));
};

// 마이페이지 개인 정보 모두 조회
Expand Down Expand Up @@ -98,8 +99,9 @@ exports.getProfile = async function (req, res) {

const nickname = userInfo[0].nickName;
const jobName = userInfo[0].jobName;
const imageUrl = userimageUrl[0].imageUrl;

return res.send(response(baseResponse.SUCCESS, { nickname: nickname, jobName: jobName, image: userimageUrl}));
return res.send(response(baseResponse.SUCCESS, { nickname, jobName, imageUrl}));
}

/**
Expand Down
1 change: 0 additions & 1 deletion src/dao/mypageDao.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ async function selectUserImage(connection, userIdx) {

// 프로필 이미지 유무 체크
if (userImageUrl.length === 0) return null;

return userImageUrl;
}

Expand Down

0 comments on commit 1ced3bd

Please sign in to comment.