Skip to content

[BE] 진단 결과 삭제 API#381

Merged
w0uldy0u merged 2 commits intodevfrom
feat/#380/implement_diagnosis_delete
Feb 15, 2026
Merged

[BE] 진단 결과 삭제 API#381
w0uldy0u merged 2 commits intodevfrom
feat/#380/implement_diagnosis_delete

Conversation

@w0uldy0u
Copy link
Collaborator

Closes #380

목적

진단결과 삭제 API 구현

@w0uldy0u w0uldy0u requested a review from kimhji February 15, 2026 14:28
@w0uldy0u w0uldy0u self-assigned this Feb 15, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @w0uldy0u, 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!

이 Pull Request는 사용자가 자신의 진단 결과를 삭제할 수 있도록 백엔드 API 기능을 구현합니다. 새로운 DELETE 엔드포인트와 해당 서비스 로직, 그리고 데이터베이스 상호작용을 위한 리포지토리 메서드를 추가하여 진단 결과 삭제의 전체 흐름을 완성했습니다. 이를 통해 사용자에게 진단 결과에 대한 더 많은 제어권을 제공하고, 불필요한 데이터를 정리할 수 있는 기능을 제공합니다.

Highlights

  • 진단 결과 삭제 API 엔드포인트 추가: /diagnosis/{diagnosisId} 경로에 DELETE 요청을 처리하는 새 엔드포인트를 추가했습니다.
  • 진단 결과 삭제 서비스 로직 구현: DiagnosisService에 특정 진단 ID와 사용자 ID에 해당하는 진단 결과를 찾아 삭제하는 deleteDiagnosis 메서드를 추가했습니다.
  • 진단 결과 조회 및 삭제를 위한 리포지토리 메서드 추가: DiagnosisRepositoryfindByIdAndUser_KakaoId 메서드를 추가하여 진단 ID와 사용자 카카오 ID로 진단 결과를 조회할 수 있도록 했습니다.
  • 삭제 기능에 대한 단위 테스트 작성: DiagnosisServiceTest에 진단 결과 삭제 성공 및 예외 처리 시나리오에 대한 테스트 케이스를 추가했습니다.
Changelog
  • backend/api/src/main/java/com/yat2/episode/diagnosis/DiagnosisController.java
    • @DeleteMapping 어노테이션 임포트가 추가되었습니다.
    • deleteDiagnosis 메서드가 추가되어 특정 진단 ID에 대한 삭제 요청을 처리합니다.
  • backend/api/src/main/java/com/yat2/episode/diagnosis/DiagnosisRepository.java
    • findByIdAndUser_KakaoId 메서드가 추가되어 진단 ID와 사용자 카카오 ID로 진단 결과를 조회합니다.
  • backend/api/src/main/java/com/yat2/episode/diagnosis/DiagnosisService.java
    • deleteDiagnosis 트랜잭션 메서드가 추가되어 진단 결과를 삭제하는 비즈니스 로직을 구현합니다.
  • backend/api/src/test/java/com/yat2/episode/diagnosis/DiagnosisServiceTest.java
    • DeleteDiagnosisTest 중첩 클래스가 추가되어 deleteDiagnosis 메서드의 성공 및 예외 케이스를 테스트합니다.
Activity
  • 이 Pull Request는 진단 결과 삭제 API 구현을 목표로 생성되었습니다.
  • w0uldy0u님이 DiagnosisController, DiagnosisRepository, DiagnosisService 파일에 삭제 관련 로직을 추가했습니다.
  • DiagnosisService의 삭제 기능에 대한 단위 테스트가 DiagnosisServiceTest에 추가되었습니다.
  • 현재까지 추가적인 리뷰 코멘트나 활동은 없습니다.
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
Contributor

@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

진단 결과 삭제 API를 구현하신 것을 확인했습니다. 전반적으로 코드가 잘 작성되었지만, 진단 결과 삭제 시 연관된 약점(weakness) 데이터가 처리되지 않아 발생하는 심각한 버그를 발견했습니다. 이로 인해 데이터베이스 제약 조건 위반 오류가 발생할 수 있습니다. 자세한 내용은 각 파일의 주석을 참고해주세요.

Copy link
Collaborator

@kimhji kimhji left a comment

Choose a reason for hiding this comment

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

LGTM!
빠른 누락 api 구현 좋아요!

@w0uldy0u w0uldy0u merged commit a42f944 into dev Feb 15, 2026
3 checks passed
@w0uldy0u w0uldy0u deleted the feat/#380/implement_diagnosis_delete branch February 15, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BE] 진단 삭제 API

2 participants