Skip to content

Commit

Permalink
Merge pull request #195 from Link-MIND/test
Browse files Browse the repository at this point in the history
[Merge] 카테고리 중복 체크시 유저 반영
  • Loading branch information
mmihye authored Jan 18, 2024
2 parents 21738aa + 2dfbc41 commit 0017b48
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 countAllByTitleAndUser(String title);
Long countAllByTitleAndUser(String title, User user);



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.countAllByTitleAndUser(createCategoryDto.categoryTitle())>0){
if(categoryRepository.countAllByTitleAndUser(createCategoryDto.categoryTitle(),presentUser)>0){
throw new CustomException(Error.UNPROCESSABLE_CREATE_TIMER_EXCEPTION, Error.UNPROCESSABLE_CREATE_TIMER_EXCEPTION.getMessage());
}

Expand Down

0 comments on commit 0017b48

Please sign in to comment.