Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,10 @@ public ApiResponse<List<AmateurShowResponseDTO.AmateurShowList>> getShowClosing(
public ApiResponse<List<AmateurShowResponseDTO.AmateurShowList>> getRecentlyHotShow(@AuthenticationPrincipal(expression = "member") Member member) {
return ApiResponse.onSuccess(amateurService.getRecentlyHotShow(member.getId()));
}

@GetMapping("/incoming")
@Operation(summary = "임박한 공연 조회 API")
public ApiResponse<List<AmateurShowResponseDTO.AmateurShowList>> getShowIncoming(@AuthenticationPrincipal(expression = "member") Member member) {
return ApiResponse.onSuccess(amateurService.getShowToday(member.getId()));
}
Comment on lines +98 to +102
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# Find AmateurService file
fd -t f "AmateurService" --type java

Repository: SeeATheater/CC_Backend

Length of output: 237


🏁 Script executed:

# Search for getShowIncoming method across the codebase
rg -nP --type=java 'getShowIncoming' -i

Repository: SeeATheater/CC_Backend

Length of output: 290


🏁 Script executed:

# Also check for getShowToday method to understand its implementation
rg -nP --type=java 'getShowToday' -A5

Repository: SeeATheater/CC_Backend

Length of output: 3153


🏁 Script executed:

# Find and display the AmateurService interface
find . -name "AmateurService.java" -not -path "*/Impl.java"

Repository: SeeATheater/CC_Backend

Length of output: 151


🏁 Script executed:

# Read the interface file to see all method signatures
cat src/main/java/cc/backend/amateurShow/service/amateurShowService/AmateurService.java

Repository: SeeATheater/CC_Backend

Length of output: 1792


Logic mismatch: endpoint calls wrong service method.

The /incoming endpoint is documented as "임박한 공연 조회 API" (imminent/upcoming performance lookup), but it calls amateurService.getShowToday(member.getId()) which retrieves today's performances.

No getShowIncoming() method exists in AmateurService, and the /today endpoint (lines 71-75) calls the identical service method, creating functional duplication. The endpoint returns the same data as /today, which is inconsistent with its documented purpose.

Expected behavior: This endpoint should call a different service method that retrieves incoming/imminent performances, or the method needs to be implemented if missing.

🤖 Prompt for AI Agents
In src/main/java/cc/backend/amateurShow/controller/AmateurController.java around
lines 98-102, the /incoming endpoint currently calls
amateurService.getShowToday(member.getId()) which returns today's shows
(duplicating /today) instead of imminent/upcoming shows; update the controller
to call the correct service method (e.g.,
amateurService.getShowIncoming(member.getId())) or, if that method does not
exist, implement a new service method getShowIncoming(Long memberId) in
AmateurService that returns the imminent performances (define the time
window/criteria there), and then have the controller call that new method and
return its result.

}