Skip to content

Commit

Permalink
[STYLE] validateShop → checkShopAuthorization 으로 메서드명 변경(#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
eunsol-an committed Sep 24, 2024
1 parent cec62d0 commit 817d817
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private void deleteHintAndAnswerImages(Hint hint) {
s3Component.deleteObjects(shopId, themeId, TYPE_ANSWER, hint.getAnswerImageList());
}

private void validateShop(Long shopId) {
private void checkShopAuthorization(Long shopId) {
if (!Objects.equals(shopId, SecurityUtil.getCurrentShopId())) {
throw new CustomException(NOT_PERMITTED);
}
Expand All @@ -111,7 +111,7 @@ private Theme validateThemeAndShop(Long themeId) {
Theme theme = themeRepository.findById(themeId)
.orElseThrow(() -> new CustomException(THEME_NOT_FOUND));

this.validateShop(theme.getShop().getId());
this.checkShopAuthorization(theme.getShop().getId());

return theme;
}
Expand All @@ -120,7 +120,7 @@ private Hint validateHintAndShop(Long hintId) {
Hint hint = hintRepository.findById(hintId)
.orElseThrow(() -> new CustomException(HINT_NOT_FOUND));

validateShop(hint.getTheme().getShop().getId());
checkShopAuthorization(hint.getTheme().getShop().getId());

return hint;
}
Expand Down

0 comments on commit 817d817

Please sign in to comment.