Skip to content

fix: Rooms API 복구#127

Merged
ho0010 merged 5 commits intodevelopfrom
feat/api-rooms
Aug 16, 2025
Merged

fix: Rooms API 복구#127
ho0010 merged 5 commits intodevelopfrom
feat/api-rooms

Conversation

@ho0010
Copy link
Collaborator

@ho0010 ho0010 commented Aug 16, 2025

Rooms 도메인 지워진 로직 복구

Summary by CodeRabbit

  • New Features
    • 그룹 상세 화면에서 참여/취소를 한 번의 버튼으로 전환할 수 있습니다.
    • 방장인 경우 모집을 즉시 마감할 수 있습니다.
    • 하단 버튼 문구가 호스트/참여 상태에 따라 자동으로 변경됩니다.
    • 최신 참여 상태를 반영해 버튼 상태가 동기화되며, 요청 실패 시 알림으로 안내합니다.
  • Style
    • 하단 버튼에 포인터 커서를 적용해 클릭 가능성을 명확히 표시했습니다.

@vercel
Copy link

vercel bot commented Aug 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
thip Ready Ready Preview Comment Aug 16, 2025 8:45am

@coderabbitai
Copy link

coderabbitai bot commented Aug 16, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

방 참여/취소 및 방 닫기 API 클라이언트를 추가하고, GroupDetail 페이지의 하단 버튼 동작을 해당 API와 연동하도록 수정했다. 버튼 커서를 포인터로 변경했다.

Changes

Cohort / File(s) Summary
Rooms API 클라이언트 추가
src/api/rooms/postJoinRoom.ts, src/api/rooms/postCloseRoom.ts
방 참여/취소(postJoinRoom) 및 방 닫기(postCloseRoom) API 래퍼 신규 추가. 요청/응답 타입 정의, POST 호출, 오류 로그 후 재throw.
GroupDetail 로직 연동
src/pages/groupDetail/GroupDetail.tsx
postJoinRoom, postCloseRoom 사용. isJoining 상태 도입 및 roomData와 동기화. 하단 버튼 클릭 시 호스트는 방 닫기, 비호스트는 참여/취소 요청. 버튼 라벨과 클릭 핸들러 동적화.
스타일 업데이트
src/pages/groupDetail/GroupDetail.styled.ts
BottomButton에 cursor: pointer 추가.

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant GroupDetail
  participant RoomsAPI as Rooms API Client
  participant Server

  User->>GroupDetail: 하단 버튼 클릭
  alt 호스트
    GroupDetail->>RoomsAPI: postCloseRoom(roomId)
    RoomsAPI->>Server: POST /rooms/{roomId}/close
    Server-->>RoomsAPI: response
    RoomsAPI-->>GroupDetail: PostCloseRoomResponse
    GroupDetail->>User: (오류 시 alert)
  else 비호스트
    GroupDetail->>RoomsAPI: postJoinRoom(roomId, 'join'|'cancel')
    RoomsAPI->>Server: POST /rooms/{roomId}/join { type }
    Server-->>RoomsAPI: response
    RoomsAPI-->>GroupDetail: PostJoinRoomResponse
    GroupDetail->>User: (오류 시 alert)
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

  • [API] Rooms API 연동 #106 — Rooms API 연동(참여/취소, 모집 마감) 작업과 동일 엔드포인트 및 기능 구현을 포함함.

Possibly related PRs

Suggested labels

📬 API

Suggested reviewers

  • heeeeyong
  • ljh130334

Poem

토실토실 토끼가 깡총 뛰며 말하길,
“문 닫기! 참여하기! 클릭 한 번에 딱!”
방은 살짝 닫히고, 발걸음은 들락날락—
버튼엔 포인터, 마음은 폴짝폴짝!
오늘도 깔끔한 호출에 귀가 쫑긋! 🐰✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 4817cf3 and d51715a.

📒 Files selected for processing (4)
  • src/api/rooms/postCloseRoom.ts (1 hunks)
  • src/api/rooms/postJoinRoom.ts (1 hunks)
  • src/pages/groupDetail/GroupDetail.styled.ts (1 hunks)
  • src/pages/groupDetail/GroupDetail.tsx (5 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/api-rooms

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ho0010 ho0010 merged commit 20421fb into develop Aug 16, 2025
2 of 3 checks passed
@heeeeyong heeeeyong added the 📬 API 서버 API 통신 label Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📬 API 서버 API 통신

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants