From 637d2a642cb7b112046598c01dd7cfcc2e6f117a Mon Sep 17 00:00:00 2001 From: jun02160 Date: Tue, 11 Jul 2023 00:04:59 +0900 Subject: [PATCH] =?UTF-8?q?[FIX]=20=EC=BD=94=EB=93=9C=EB=A6=AC=EB=B7=B0=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=EC=82=AC=ED=95=AD=20=EB=B0=98=EC=98=81=20#16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../parentchild/controller/ParentchildController.java | 6 ++---- ...ResponseDto.java => OnboardingReceiveResponseDto.java} | 6 +++--- .../domain/parentchild/service/ParentchildService.java | 8 +++----- 3 files changed, 8 insertions(+), 12 deletions(-) rename src/main/java/sopt/org/umbbaServer/domain/parentchild/controller/dto/response/{OnboadringReceiveResponseDto.java => OnboardingReceiveResponseDto.java} (84%) diff --git a/src/main/java/sopt/org/umbbaServer/domain/parentchild/controller/ParentchildController.java b/src/main/java/sopt/org/umbbaServer/domain/parentchild/controller/ParentchildController.java index 04f3b450..e4d83f7d 100644 --- a/src/main/java/sopt/org/umbbaServer/domain/parentchild/controller/ParentchildController.java +++ b/src/main/java/sopt/org/umbbaServer/domain/parentchild/controller/ParentchildController.java @@ -8,15 +8,13 @@ import sopt.org.umbbaServer.domain.parentchild.controller.dto.request.OnboardingInviteRequestDto; import sopt.org.umbbaServer.domain.parentchild.controller.dto.request.OnboardingReceiveRequestDto; import sopt.org.umbbaServer.domain.parentchild.controller.dto.response.InviteResultResponeDto; -import sopt.org.umbbaServer.domain.parentchild.controller.dto.response.OnboadringReceiveResponseDto; +import sopt.org.umbbaServer.domain.parentchild.controller.dto.response.OnboardingReceiveResponseDto; import sopt.org.umbbaServer.domain.parentchild.controller.dto.response.OnboardingInviteResponseDto; import sopt.org.umbbaServer.domain.parentchild.service.ParentchildService; import sopt.org.umbbaServer.global.common.dto.ApiResponse; -import sopt.org.umbbaServer.global.config.jwt.JwtProvider; import sopt.org.umbbaServer.global.exception.SuccessType; import javax.validation.Valid; -import java.security.Principal; @Slf4j @RestController @@ -45,7 +43,7 @@ public ApiResponse inviteRelation(@Valid @RequestBody In @PatchMapping("/receive") @ResponseStatus(HttpStatus.OK) - public ApiResponse onboardReceive(@Valid @RequestBody OnboardingReceiveRequestDto request) { + public ApiResponse onboardReceive(@Valid @RequestBody OnboardingReceiveRequestDto request) { return ApiResponse.success(SuccessType.CREATE_PARENT_CHILD_SUCCESS, parentchildService.onboardReceive(request)); } diff --git a/src/main/java/sopt/org/umbbaServer/domain/parentchild/controller/dto/response/OnboadringReceiveResponseDto.java b/src/main/java/sopt/org/umbbaServer/domain/parentchild/controller/dto/response/OnboardingReceiveResponseDto.java similarity index 84% rename from src/main/java/sopt/org/umbbaServer/domain/parentchild/controller/dto/response/OnboadringReceiveResponseDto.java rename to src/main/java/sopt/org/umbbaServer/domain/parentchild/controller/dto/response/OnboardingReceiveResponseDto.java index 52a4fdd2..f9e80d6e 100644 --- a/src/main/java/sopt/org/umbbaServer/domain/parentchild/controller/dto/response/OnboadringReceiveResponseDto.java +++ b/src/main/java/sopt/org/umbbaServer/domain/parentchild/controller/dto/response/OnboardingReceiveResponseDto.java @@ -14,7 +14,7 @@ @Getter @Builder @AllArgsConstructor(access = AccessLevel.PRIVATE) -public class OnboadringReceiveResponseDto { +public class OnboardingReceiveResponseDto { private UserInfoDto userInfo; @@ -22,8 +22,8 @@ public class OnboadringReceiveResponseDto { private LocalTime pushTime; - public static OnboadringReceiveResponseDto of(Parentchild parentchild, User user, List parentChildUsers) { - return OnboadringReceiveResponseDto.builder() + public static OnboardingReceiveResponseDto of(Parentchild parentchild, User user, List parentChildUsers) { + return OnboardingReceiveResponseDto.builder() .userInfo(UserInfoDto.of(user)) .parentchildInfo(InviteResultResponeDto.of(parentchild, parentChildUsers)) .pushTime(parentchild.getPushTime()) diff --git a/src/main/java/sopt/org/umbbaServer/domain/parentchild/service/ParentchildService.java b/src/main/java/sopt/org/umbbaServer/domain/parentchild/service/ParentchildService.java index 4abf4574..7d082e6c 100644 --- a/src/main/java/sopt/org/umbbaServer/domain/parentchild/service/ParentchildService.java +++ b/src/main/java/sopt/org/umbbaServer/domain/parentchild/service/ParentchildService.java @@ -3,21 +3,19 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.RandomStringUtils; -import org.jetbrains.annotations.NotNull; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import sopt.org.umbbaServer.domain.parentchild.controller.dto.request.InviteCodeRequestDto; import sopt.org.umbbaServer.domain.parentchild.controller.dto.request.OnboardingInviteRequestDto; import sopt.org.umbbaServer.domain.parentchild.controller.dto.request.OnboardingReceiveRequestDto; import sopt.org.umbbaServer.domain.parentchild.controller.dto.response.InviteResultResponeDto; -import sopt.org.umbbaServer.domain.parentchild.controller.dto.response.OnboadringReceiveResponseDto; +import sopt.org.umbbaServer.domain.parentchild.controller.dto.response.OnboardingReceiveResponseDto; import sopt.org.umbbaServer.domain.parentchild.controller.dto.response.OnboardingInviteResponseDto; import sopt.org.umbbaServer.domain.parentchild.model.Parentchild; import sopt.org.umbbaServer.domain.parentchild.model.ParentchildRelation; import sopt.org.umbbaServer.domain.parentchild.repository.ParentchildRepository; import sopt.org.umbbaServer.domain.user.model.User; import sopt.org.umbbaServer.domain.user.repository.UserRepository; -import sopt.org.umbbaServer.global.config.jwt.JwtProvider; import sopt.org.umbbaServer.global.exception.CustomException; import sopt.org.umbbaServer.global.exception.ErrorType; @@ -60,7 +58,7 @@ public OnboardingInviteResponseDto onboardInvite(OnboardingInviteRequestDto requ // [수신] 초대받는 측의 온보딩 정보 입력 @Transactional - public OnboadringReceiveResponseDto onboardReceive(OnboardingReceiveRequestDto request) { + public OnboardingReceiveResponseDto onboardReceive(OnboardingReceiveRequestDto request) { User user = userRepository.findById(request.getUserInfo().getUserId()).orElseThrow( () -> new CustomException(ErrorType.INVALID_USER) @@ -79,7 +77,7 @@ public OnboadringReceiveResponseDto onboardReceive(OnboardingReceiveRequestDto r List parentChildUsers = getParentChildUsers(parentchild); - return OnboadringReceiveResponseDto.of(parentchild, user, parentChildUsers); + return OnboardingReceiveResponseDto.of(parentchild, user, parentChildUsers); } // 부모자식 관계 케이스 분류하기