Skip to content

Commit

Permalink
Merge pull request #115 from ajy9851/fix/114/creatorFix
Browse files Browse the repository at this point in the history
[FIX] 슀팟 생성 μœ μ €κ°€ μžμ‹ μ˜ μŠ€νŒŸμ— μ°Έμ—¬ μ‹œ μ˜ˆμ™Έμ²˜λ¦¬
  • Loading branch information
ajy9851 authored Nov 14, 2024
2 parents 6c36c91 + 053cbd5 commit b936bf7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ public CreateOrderDetailRes participantOrder(Member member, CreateOrderDetailReq
simpleSpotRepository
.findById(dto.getSpotId())
.orElseThrow(() -> new IllegalArgumentException("슀팟 정보가 μ—†μŠ΅λ‹ˆλ‹€."));

if (member.getId().equals(spot.getMember().getId()))
throw new IllegalArgumentException("λ°©μž₯μž…λ‹ˆλ‹€.(μ°Έμ—¬μžλ§Œ μ‚¬μš© κ°€λŠ₯)");

OrderDetail orderDetail =
orderDetailRepository.save(
OrderDetail.builder()
Expand Down

0 comments on commit b936bf7

Please sign in to comment.