From ba869edb188d105a0a0a645f76a505e8df1b995e Mon Sep 17 00:00:00 2001 From: mmihye Date: Fri, 19 Jan 2024 03:57:05 +0900 Subject: [PATCH] =?UTF-8?q?[#184]=20fix:=20=EC=B9=B4=ED=85=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=20=EC=A4=91=EB=B3=B5=EC=B2=B4=ED=81=AC=20=EC=8B=9C=20?= =?UTF-8?q?=EC=9C=A0=EC=A0=80=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/app/toaster/infrastructure/CategoryRepository.java | 2 +- .../java/com/app/toaster/service/category/CategoryService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linkmind/src/main/java/com/app/toaster/infrastructure/CategoryRepository.java b/linkmind/src/main/java/com/app/toaster/infrastructure/CategoryRepository.java index 8da9bc9c..0b29c63b 100644 --- a/linkmind/src/main/java/com/app/toaster/infrastructure/CategoryRepository.java +++ b/linkmind/src/main/java/com/app/toaster/infrastructure/CategoryRepository.java @@ -64,7 +64,7 @@ void increasePriorityByOne(@Param("categoryId") Long categoryId, Long countAllByUser(User user); - Long countAllByTitleAndUser(String title); + Long countAllByTitleAndUser(String title, User user); diff --git a/linkmind/src/main/java/com/app/toaster/service/category/CategoryService.java b/linkmind/src/main/java/com/app/toaster/service/category/CategoryService.java index 9c9a2be9..5744480f 100644 --- a/linkmind/src/main/java/com/app/toaster/service/category/CategoryService.java +++ b/linkmind/src/main/java/com/app/toaster/service/category/CategoryService.java @@ -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()); }