Skip to content

Commit

Permalink
Merge pull request #192 from Link-MIND/feature/#185
Browse files Browse the repository at this point in the history
[#184] 카테고리 이름 중복 체크 유저마다로 변경
  • Loading branch information
sss4920 authored Jan 18, 2024
2 parents ff928cf + 02ba7c8 commit 323b15d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void increasePriorityByOne(@Param("categoryId") Long categoryId,

Long countAllByUser(User user);

Long countAllByTitle(String title);
Long countAllByTitleAndUser(String title);



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void createCategory(final Long userId, final CreateCategoryDto createCate
Error.BAD_REQUEST_CREATE_CLIP_EXCEPTION.getMessage());
}

if(categoryRepository.countAllByTitle(createCategoryDto.categoryTitle())>0){
if(categoryRepository.countAllByTitleAndUser(createCategoryDto.categoryTitle())>0){
throw new CustomException(Error.UNPROCESSABLE_CREATE_TIMER_EXCEPTION, Error.UNPROCESSABLE_CREATE_TIMER_EXCEPTION.getMessage());
}

Expand Down

0 comments on commit 323b15d

Please sign in to comment.