Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] issue359: 기존 githubId 사용하던 곳 모두 memberId 로 변경 #360

Merged
merged 3 commits into from
Sep 29, 2022

Conversation

tco0427
Copy link
Collaborator

@tco0427 tco0427 commented Sep 18, 2022

요약

memberId 를 응답으로 내려주도록 수정

세부사항

ArgumentResolver 는 제거하였지만, 여전히 몇몇 API 에서 githubId 를 응답으로 내려주고 있습니다.
해당 부분을 모두 통일성 있게 memberId로 수정을 진행해야 합니다.

  • : Article 조회시 memberId 사용하도록 수정
  • : Member 조회시 memberId 사용하도록 수정
  • : Link 조회시 memberId 사용하도록 수정
  • : Review 조회시 memberId 사용하도록 수정

close #359

@tco0427 tco0427 added 🖥 backend New backend feature 🛠 refactoring Refactor code labels Sep 18, 2022
@tco0427 tco0427 linked an issue Sep 18, 2022 that may be closed by this pull request
@2022-moamoa

This comment has been minimized.

@2022-moamoa

This comment has been minimized.

@2022-moamoa
Copy link

2022-moamoa bot commented Sep 18, 2022

Passed

Analysis Details

1 Issue

  • Bug 0 Bugs
  • Vulnerability 1 Vulnerability
  • Code Smell 0 Code Smells

Coverage and Duplications

  • Coverage No coverage information (71.90% Estimated after merge)
  • Duplications No duplication information (0.40% Estimated after merge)

Project ID: woowacourse-teams_2022-moamoa_AYKvd_z4VbW_bWBvgn13

View in SonarQube

Copy link
Collaborator

@sc0116 sc0116 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

githubId에서 memberId로 바꿀게 넘 많네요ㅠㅠ 고생하셨슴당 몽키.D.WOO

@@ -18,7 +18,7 @@ public class ReviewDao {

public List<ReviewData> findAllByStudyId(final Long studyId) {
String sql = "SELECT review.id, review.content, review.created_date, review.last_modified_date, "
+ "member.github_id, member.username, member.image_url, member.profile_url "
+ "member.id as member_id, member.username, member.image_url, member.profile_url "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ㅎㅎ 이 부분과 LinkDao 부분을 제가 저번 PR에서 확인하지 못해 기능 구현하다가 오류가 많이나서 당황했네욤... 더 꼼꼼한 리뷰 남길게요 ㅎㅎ

@@ -75,7 +73,7 @@ void getStudyDetails() {
.body("enrollmentEndDate", is(지금.plusDays(4).toString()))
.body("startDate", is(지금.toString()))
.body("endDate", is(지금.plusDays(10).toString()))
.body("owner.id", is((int)디우_깃허브_ID))
.body("owner.id", not(empty()))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요거도 좋지만 정보 가져와서 실제 디우(방장)의 아이디 넣어줘서 확인하는건 어떠세요? 저는 그렇게 고치고 있어요!

Copy link
Collaborator Author

@tco0427 tco0427 Sep 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오..!! 저는 아래와 같은 방식으로 id를 가져오려고 했는데 잘 안되어서 empty() 로 해주었는데요..
혹시 짱구는 어떻게 아이디를 가져와서 비교해주셨나요!!

final MemberResponse 디우_정보 = 디우가().로그인하고().정보를_가져온다();

@tco0427 tco0427 merged commit 38a0137 into develop Sep 29, 2022
@tco0427 tco0427 deleted the refactor/359-memberId branch September 29, 2022 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖥 backend New backend feature 🛠 refactoring Refactor code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BE] 기존 githubId 사용하던 곳 모두 memberId 로 변경
4 participants