Skip to content

[#180][FEATURE] 그룹 탈퇴#181

Open
zjxlomin wants to merge 5 commits intodevfrom
feat/member-signout
Open

[#180][FEATURE] 그룹 탈퇴#181
zjxlomin wants to merge 5 commits intodevfrom
feat/member-signout

Conversation

@zjxlomin
Copy link
Contributor

✨ 구현 기능 명세

사용자가 가입한 그룹에서 탈퇴합니다.

  • 사용자가 해당 그룹에 소속되어있는지 또는 해당 그룹의 그룹장이 아닌지 확인
  • 그룹의 채팅방에서 탈퇴한 이후 그룹에서 탈퇴

✅ PR Point

😭 어려웠던 점

@gemini-code-assist
Copy link

Summary of Changes

Hello @zjxlomin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 풀 리퀘스트는 사용자가 스터디 그룹에서 탈퇴할 수 있는 기능을 도입합니다. 여기에는 새로운 API 엔드포인트 추가, 그룹장이 탈퇴할 수 없도록 하는 비즈니스 로직 구현, 그리고 사용자가 그룹을 떠날 때 채팅방에서 자동으로 제거되도록 하는 기능이 포함됩니다. 이 변경 사항은 사용자에게 그룹 멤버십에 대한 더 많은 제어권을 제공하며, 관련 API 문서와 테스트 코드도 함께 업데이트되었습니다.

Highlights

  • 그룹 탈퇴 API 추가: 사용자가 그룹에서 탈퇴할 수 있도록 새로운 DELETE API 엔드포인트 /groups/{groupId}/leave를 추가했습니다.
  • 그룹장 탈퇴 방지 로직 구현: 그룹장은 그룹을 탈퇴할 수 없도록 하는 비즈니스 로직을 GroupMemberWriter에 구현하여 그룹의 무결성을 유지합니다.
  • 채팅방 연동: 그룹 탈퇴 시 해당 사용자를 그룹 채팅방에서 자동으로 제거하도록 기능을 추가하여 일관된 상태를 유지합니다.
  • API 문서 및 테스트 코드 작성: 새로 추가된 그룹 탈퇴 기능에 대한 API 문서(Asciidoc)와 컨트롤러, 서비스, 워커 계층의 단위 및 통합 테스트 코드를 작성하여 기능의 신뢰성을 확보했습니다.
Changelog
  • src/asciidoc/api/group.adoc
    • 그룹 탈퇴 API에 대한 문서를 추가했습니다.
  • src/main/java/com/studypals/domain/groupManage/api/GroupEntryController.java
    • 그룹 탈퇴를 위한 DELETE /groups/{groupId}/leave 엔드포인트를 추가했습니다.
    • leaveGroup 메서드를 추가하여 그룹 탈퇴 요청을 처리하도록 했습니다.
  • src/main/java/com/studypals/domain/groupManage/service/GroupEntryService.java
    • GroupEntryService 인터페이스에 leaveGroup 메서드를 정의했습니다.
  • src/main/java/com/studypals/domain/groupManage/service/GroupEntryServiceImpl.java
    • leaveGroup 메서드를 구현하여 채팅방 탈퇴 및 그룹 멤버 삭제 로직을 처리하도록 했습니다.
  • src/main/java/com/studypals/domain/groupManage/worker/GroupMemberWriter.java
    • deleteMember 메서드를 추가하여 그룹 멤버 삭제 기능을 구현했습니다.
    • 그룹장이 탈퇴할 수 없도록 하는 예외 처리 로직을 포함했습니다.
  • src/test/java/com/studypals/domain/groupManage/restDocsTest/GroupEntryControllerRestDocsTest.java
    • 그룹 탈퇴 API의 성공적인 동작을 검증하는 테스트와 REST Docs 생성을 위한 코드를 추가했습니다.
  • src/test/java/com/studypals/domain/groupManage/service/GroupEntryServiceTest.java
    • 서비스 계층에서 그룹 탈퇴 기능의 성공적인 동작을 테스트하고, chatRoomWritergroupMemberWriter와의 상호작용을 검증하는 테스트를 추가했습니다.
  • src/test/java/com/studypals/domain/groupManage/worker/GroupMemberWriterTest.java
    • deleteMember 메서드의 성공 케이스와 그룹장이 탈퇴할 수 없는 실패 케이스를 테스트하는 코드를 추가했습니다.
Activity
  • 현재까지 풀 리퀘스트에 대한 사용자 활동(댓글, 리뷰 등)은 없습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces functionality for users to leave a group, including API endpoints, service logic, and corresponding tests. The changes appear to be well-structured and cover the necessary components for this feature. The documentation for the new API endpoint has also been updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant