Skip to content

Commit 7aa5cf4

Browse files
committed
fix: merge 중에 생긴 중복코드 수정
1 parent 095638b commit 7aa5cf4

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

src/main/java/com/Rootin/domain/garden/service/PotService.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -222,17 +222,6 @@ public PotResponse updatePot(Long potId, Long userId, PotUpdateRequest request)
222222
return PotResponse.from(pot);
223223
}
224224

225-
// S3에서 사용하기 위한 Validation
226-
public void validateOwnership(Long userId, Long potId) {
227-
Pot pot = potRepository.findById(potId)
228-
.orElseThrow(() -> CustomException.notFound("존재하지 않는 화분입니다. ID: " + potId));
229-
230-
if (!pot.getUserId().equals(userId)) {
231-
throw CustomException.forbidden("해당 화분에 접근할 권한이 없습니다.");
232-
}
233-
}
234-
235-
236225
/**
237226
* 특정 화분을 삭제합니다.
238227
* 1. 화분 소유권 검증 (삭제 요청한 사용자가 화분의 소유자인지 확인)

0 commit comments

Comments
 (0)