Skip to content

#155 - 개별 쪽지 삭제 API를 구현합니다. #160

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

Merged
merged 2 commits into from
May 6, 2025

Conversation

kpeel5839
Copy link
Contributor

1. 🔗 관련 이슈

closes #155

2. 📄 구현한 내용 또는 수정한 내용

  • 쪽지 개별 삭제 API 를 구현했습니다.
  • 유저가 개별 쪽지를 조회할 때, 본인이 삭제한 쪽지에 대해서는 조회할 수 없도록 했습니다.

5. ✅ 배포 Checklist

  • 본인을 Assign 해주세요.
  • 본인을 제외한 백엔드 개발자를 리뷰어로 지정해주세요.
  • 변경된 DB 업데이트 해주세요. (꼭 해주세요 배포 안돼요!!!)

@kpeel5839 kpeel5839 requested a review from Copilot May 6, 2025 06:57
@kpeel5839 kpeel5839 self-assigned this May 6, 2025
@kpeel5839 kpeel5839 added 🌱기능🌱 새로운 기능을 추가해요 ! 🏋️매튜🏋️ 24기 김재연 labels May 6, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request implements an API for individual message deletion, ensuring that users cannot view messages they have deleted. Key changes include:

  • Adding deletion logic to the MessageV2 domain model with mutable flags and timestamps.
  • Extending MessageRoom and MessageDetails to support deletion constraints and filtering.
  • Introducing a new service and controller layer for the deletion API.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
domain/src/main/kotlin/com/wespot/message/v2/MessageV2.kt Added mutable deletion flags and deletion logic in MessageV2.
domain/src/main/kotlin/com/wespot/message/v2/MessageRoom.kt Introduced methods for retrieving message room details and deleting messages.
domain/src/main/kotlin/com/wespot/message/v2/MessageDetails.kt Updated message list construction to exclude deleted messages.
domain/src/main/kotlin/com/wespot/message/v2/MessageDetail.kt Added deletion delegation and deletion check method.
core/src/main/kotlin/com/wespot/message/service/v2/DeleteMessageV2Service.kt Implemented deletion use-case leveraging the new domain methods.
core/src/main/kotlin/com/wespot/message/port/in/DeleteMessageV2UseCase.kt Declared the deletion API interface.
core/src/main/kotlin/com/wespot/message/dto/response/MessageV2DetailsResponse.kt Updated response mapping to utilize the revised message detail list.
app/src/main/kotlin/com/wespot/message/v2/DeleteMessageV2Controller.kt Created the deletion API endpoint.
Comments suppressed due to low confidence (1)

domain/src/main/kotlin/com/wespot/message/v2/MessageDetail.kt:64

  • The isNotDeleted function currently returns true when the message is marked as deleted. It should invert the result of message.isDeleted(viewer) (i.e., return !message.isDeleted(viewer)) to correctly filter out deleted messages.
fun isNotDeleted(viewer: User): Boolean { return message.isDeleted(viewer = viewer) }

@kpeel5839
Copy link
Contributor Author

Pull Request Overview

This pull request implements an API for individual message deletion, ensuring that users cannot view messages they have deleted. Key changes include:

  • Adding deletion logic to the MessageV2 domain model with mutable flags and timestamps.
  • Extending MessageRoom and MessageDetails to support deletion constraints and filtering.
  • Introducing a new service and controller layer for the deletion API.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
Comments suppressed due to low confidence (1)
domain/src/main/kotlin/com/wespot/message/v2/MessageDetail.kt:64

  • The isNotDeleted function currently returns true when the message is marked as deleted. It should invert the result of message.isDeleted(viewer) (i.e., return !message.isDeleted(viewer)) to correctly filter out deleted messages.
fun isNotDeleted(viewer: User): Boolean { return message.isDeleted(viewer = viewer) }

Thanks

@kpeel5839 kpeel5839 merged commit fce3952 into develop May 6, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱기능🌱 새로운 기능을 추가해요 ! 🏋️매튜🏋️ 24기 김재연
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature]: 개별 쪽지를 삭제하는 API를 개발합니다.
1 participant