Skip to content

#1 feat: reservation_id로 예약 존재 여부 조회 API 추가#21

Merged
minseo0313 merged 1 commit into
mainfrom
feature/#1-Reservation_v1
May 22, 2026
Merged

#1 feat: reservation_id로 예약 존재 여부 조회 API 추가#21
minseo0313 merged 1 commit into
mainfrom
feature/#1-Reservation_v1

Conversation

@minseo0313
Copy link
Copy Markdown
Collaborator

@minseo0313 minseo0313 commented May 22, 2026

💡 개요

Issue Number: #1

🪐 주요 변경 사항

  • GET /api/v1/bookings/{reservation_id}/exists API 추가

✅ 상세 내용

  • reservation_id로 예약 존재 여부를 조회하는 API 구현
  • 예약이 있으면 { "exists": true }, 없으면 { "exists": false } 응답
  • JpaRepository.existsById()를 활용하여 DB 조회

🔔 참고 사항

  • n8n 등 외부 자동화 플로우에서 예약 유효성 검증 용도로 활용 가능
  • 변경 목적: 외부 자동화 워크플로우(e.g., n8n)에서 예약의 유효성을 검증하기 위해 reservation_id로 예약 존재 여부를 조회할 수 있는 API 엔드포인트를 추가합니다.

  • 주요 변경 내용:

    • Controller 레이어: ReservationControllerGET /api/v1/bookings/{reservation_id}/exists 엔드포인트 추가 → {"exists": true/false} 형태로 응답
    • Service 레이어: ReservationServiceexistsReservation(Long reservationId) 메서드 추가 → reservationRepository.existsById(reservationId) 호출로 구현
  • 영향 범위: API 변경 (새로운 조회 엔드포인트 추가)

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c917df32-4a02-476d-a69d-65e2de29aa9f

📥 Commits

Reviewing files that changed from the base of the PR and between 6b3fe02 and 048d523.

📒 Files selected for processing (2)
  • src/main/java/com/nailagent/backend/domain/reservation/controller/ReservationController.java
  • src/main/java/com/nailagent/backend/domain/reservation/service/ReservationService.java

📝 Walkthrough

예약 존재 여부 확인 API 추가

이 PR에서는 특정 예약이 데이터베이스에 존재하는지 빠르게 확인할 수 있는 새로운 API 엔드포인트를 추가합니다. 컨트롤러와 서비스 계층이 협력하여 /api/v1/bookings/{reservation_id}/exists 경로로 존재 여부를 조회합니다.

변경 사항

예약 존재 여부 확인 기능

계층 / 파일 요약
예약 존재 여부 엔드포인트 및 서비스 메서드
src/main/java/com/nailagent/backend/domain/reservation/service/ReservationService.java, src/main/java/com/nailagent/backend/domain/reservation/controller/ReservationController.java
ReservationServiceexistsReservation(Long reservationId) 메서드가 추가되어 저장소의 existsById를 호출하고, ReservationController의 새로운 GET 엔드포인트가 이를 호출하여 {"exists": boolean} 형태로 응답합니다.

🎯 1 (Trivial) | ⏱️ ~3 분

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경사항의 핵심을 명확하게 반영하고 있습니다. 예약 존재 여부를 조회하는 API 추가라는 주요 변경사항을 정확히 설명하고 있으며, 간결하고 구체적입니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/#1-Reservation_v1

Comment @coderabbitai help to get the list of available commands and usage tips.

@minseo0313 minseo0313 merged commit 755cf08 into main May 22, 2026
1 of 2 checks passed
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