From a9a2e0f816bea77dfec47447b460cec84a070b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=9D=B8=EC=A4=80?= <54973090+dlswns2480@users.noreply.github.com> Date: Sat, 24 Aug 2024 22:33:12 +0900 Subject: [PATCH] =?UTF-8?q?edit=20:=20=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC?= =?UTF-8?q?=20=EC=97=90=EB=9F=AC=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?(#126)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/com/pokit/category/port/service/CategoryService.kt | 4 ++-- .../kotlin/com/pokit/category/exception/CategoryErrorCode.kt | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/application/src/main/kotlin/com/pokit/category/port/service/CategoryService.kt b/application/src/main/kotlin/com/pokit/category/port/service/CategoryService.kt index 5cf8d12e..517cfc8d 100644 --- a/application/src/main/kotlin/com/pokit/category/port/service/CategoryService.kt +++ b/application/src/main/kotlin/com/pokit/category/port/service/CategoryService.kt @@ -142,11 +142,11 @@ class CategoryService( } if (categoryPort.countByUserId(userId) >= MAX_CATEGORY_COUNT) { - throw InvalidRequestException(CategoryErrorCode.SHARE_MAX_CATEGORY_LIMIT_EXCEEDED) + throw InvalidRequestException(CategoryErrorCode.MAX_CATEGORY_LIMIT_EXCEEDED) } if (categoryPort.existsByNameAndUserId(categoryName, userId)) { - throw AlreadyExistsException(CategoryErrorCode.SHARE_ALREADY_EXISTS_CATEGORY_NAME) + throw AlreadyExistsException(CategoryErrorCode.ALREADY_EXISTS_CATEGORY) } val categoryImage = (categoryImagePort.loadById(categoryImageId) ?: throw NotFoundCustomException(CategoryErrorCode.NOT_FOUND_CATEGORY_IMAGE)) diff --git a/domain/src/main/kotlin/com/pokit/category/exception/CategoryErrorCode.kt b/domain/src/main/kotlin/com/pokit/category/exception/CategoryErrorCode.kt index 291f600a..fad7ef90 100644 --- a/domain/src/main/kotlin/com/pokit/category/exception/CategoryErrorCode.kt +++ b/domain/src/main/kotlin/com/pokit/category/exception/CategoryErrorCode.kt @@ -13,6 +13,4 @@ enum class CategoryErrorCode( MAX_CATEGORY_LIMIT_EXCEEDED("최대 30개의 포킷을 생성할 수 있습니다. 포킷을 삭제한 뒤에 추가해주세요.", "CA_005"), NOT_FOUND_UNCATEGORIZED_IMAGE("미분류 카테고리 이미지를 찾는데 실패했습니다.", "CA_006"), SHARE_ALREADY_EXISTS_CATEGORY("직접 생성한 포킷은 공유받을 수 없습니다.\n 다른 유저의 포킷을 공유받아보세요.", "CA_007"), - SHARE_MAX_CATEGORY_LIMIT_EXCEEDED("최대 30개의 포킷을 생성할 수 있습니다.\n 포킷을 삭제한 뒤에 저장해주세요.", "CA_008"), - SHARE_ALREADY_EXISTS_CATEGORY_NAME("같은 이름의 포킷이 존재합니다.\n 공유 받은 포킷명을 변경해야 저장 가능합니다.", "CA_009"), }