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

[FE] feat : 회원용 리뷰 그룹 생성 API 연결 및 관련 목서버 셋팅 수정 #1072

Merged
merged 15 commits into from
Feb 10, 2025

Conversation

BadaHertz52
Copy link
Contributor


🚀 어떤 기능을 구현했나요 ?

  • 리뷰 링크 생성 폼에 회원용 reviewRequeseCode 생성 API 연결
  • 목 서버에서 내려주는 회원용/비회원용 reviewRequestCode를 분리
/**리뷰 연결 페이지에서 유효한 reviewRequestCode */
export const VALID_REVIEW_REQUEST_CODE = {
 nonMember: `ABCD1234`,
 member: 'MEMBER1234',
};
  • 회원용 리뷰 링크 생성 폼인지 여부인 isMemeber를 사용해, 회원여부에 따라 다른 데이터를 사용해 API 요청
  • 서버에서 리뷰 연결 페이지에서 revieweeId로 회원이 만든 리뷰 그룹인지 내려주고 있기 때문에, 리뷰 연결 페이지로 연결되는 리뷰 링크는 그대로 유지

회원용 리뷰 그룹 생성 시 화면

스크린샷 2025-01-23 오후 12 56 31

비회원용 리뷰 그룹 생성 시 화면

스크린샷 2025-01-23 오후 1 34 36

회원용/비회원용 reviewRequestCode 분리한 이유

상황 :

  • 회원용으로 만든 리뷰 그룹이냐에 따라 리뷰 그룹 요청 시 body, 리뷰 연결 페이지에서 리뷰 간단 조회 시 응답값의 revieweeId 값이 달라집니다.

분리한 이유 :

  • 리뷰 연결 페이지의 url만으로는 회원용으로 만든 지 알 수 없기 때문에, 개발 시 또는 버그 잡을 때 로컬 환경에서 보다 쉽게 회원용으로 만든 리뷰인지 파악할 수 있도록 회원용/비회원용 reviewRequestCode를 분리했습니다.

기대하는 바 :

  • 디버깅, 유지 보수 뿐만 아니라 목 서버에서 회원용/비회원용 목 데이터를 분리할 때 사용할 수 있습니다.

추가 내용 :

  • reviewRequestCode 분리에 따라 관련된 목 핸들러, 테스트 변경했습니다.
  • 다만 리뷰 목록/상세 페이지에서 리뷰 데이터를 가져올 때 회원용/비회원용 목 데이터를 분리하는 것은 아직 정해지지 않았고 이를 구현하는 팀원의 판단에 맡기는 게 맞다고 생각해 회원용/비회원용 reviewRequestCode에서 모두 동일한 리뷰 목록/상세 페이지 데이터가 내려오도록 했습니다.

🔥 어떻게 해결했나요 ?

📝 어떤 부분에 집중해서 리뷰해야 할까요?

📚 참고 자료, 할 말

  • ⚠️ 회원 전용 페이지 path에 대한 변경 사항이 함께 포함되어 있습니다. path pr 머지 후 머지해주세요.
  • ⚠️ reviewRequestCode를 사용하신다면, 회원용/비회원용 reviewRequestCode 분리된 것을 확인해주세요.

@BadaHertz52 BadaHertz52 self-assigned this Jan 23, 2025
@BadaHertz52 BadaHertz52 linked an issue Jan 23, 2025 that may be closed by this pull request
@BadaHertz52 BadaHertz52 changed the title Fe/feat/1068 loggined review group api [FE] feat : 회원용 리뷰 그룹 생성 API 연결 및 관련 목서버 수정 Jan 23, 2025
@BadaHertz52 BadaHertz52 changed the title [FE] feat : 회원용 리뷰 그룹 생성 API 연결 및 관련 목서버 수정 [FE] feat : 회원용 리뷰 그룹 생성 API 연결 및 관련 목서버 셋팅 수정 Jan 23, 2025
@BadaHertz52 BadaHertz52 added this to the 7차 스프린트 milestone Jan 23, 2025
Copy link
Contributor

@ImxYJL ImxYJL left a comment

Choose a reason for hiding this comment

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

테스트까지 고치느라 수고 많았어요!

Copy link
Contributor

@soosoo22 soosoo22 left a comment

Choose a reason for hiding this comment

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

회원, 비회원에 따라 reviewRequestCode를 분리한 것! 좋은 것 같아요!!

🤔 문득 든 생각

저도 리뷰 링크 페이지를 담당하고 있어서 갑자기 든 생각인데요. URLGeneratorForm에서 지금은 reviewZone 경로에 reveiwRequestCode만 추가해서 넘겨주고 있는데, 회원인 사용자 입장에서는 reviewZone이 아니라 reviewList 경로를 넘겨주는 게 맞는거 아닌가? 라는 생각이 드네요. 회원인 사용자의 경우, 리뷰 링크를 생성한 후 오른쪽에 리뷰 링크 아이템을 클릭하면 바로 리뷰 목록으로 이동하는 게 자연스러워서 reviewList 경로로 넘겨주는 것이 더 맞지 않나 싶어요!

Comment on lines +15 to +18
export const VALID_REVIEW_REQUEST_CODE = {
nonMember: `ABCD1234`,
member: 'MEMBER1234',
};
Copy link
Contributor

Choose a reason for hiding this comment

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

구분이 더 잘 되는 것 같아서 좋네요👍

@BadaHertz52
Copy link
Contributor Author

회원인 사용자 입장에서는 reviewZone이 아니라 reviewList 경로를 넘겨주는 게 맞는거 아닌가?

모달에 있는 링크는 리뷰어들에게 공유되는 url이라
리뷰 연결페이지로 가는 게 맞지 않나요?

@soosoo22
Copy link
Contributor

모달에 있는 링크는 리뷰어들에게 공유되는 url이라 리뷰 연결페이지로 가는 게 맞지 않나요?

OMG.... 아... 맞네요....^_^

Copy link
Contributor

@chysis chysis left a comment

Choose a reason for hiding this comment

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

회원/비회원 구분만으로도 의미가 있다고 생각합니다. 고생했어요!

@chysis chysis merged commit ad45ead into develop Feb 10, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[FE] 회원용 리뷰 그룹 생성 API을 연결한다
4 participants