From ff524a4730b3aa9cf9b85c2a686c0a52aaf2dcf8 Mon Sep 17 00:00:00 2001 From: JJ503 <63184334+JJ503@users.noreply.github.com> Date: Fri, 9 Feb 2024 18:47:53 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20requeest=EC=99=80=20response=20?= =?UTF-8?q?=ED=8C=A8=ED=82=A4=EC=A7=80=20=EB=B6=84=EB=A6=AC=EA=B0=80=20?= =?UTF-8?q?=EC=95=88=20=EB=90=9C=20=EA=B3=B3=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../blooming/authentication/application/dto/LogoutDto.java | 2 +- .../presentation/AuthenticationController.java | 6 +++--- .../authentication/presentation/dto/WithdrawRequest.java | 4 ---- .../presentation/dto/{ => request}/LogoutRequest.java | 2 +- .../dto/{response => request}/SocialLoginRequest.java | 2 +- .../presentation/dto/request/WithdrawRequest.java | 4 ++++ .../notification/presentation/NotificationController.java | 2 +- .../dto/{ => response}/ReadNotificationsResponse.java | 2 +- .../presentation/AuthenticationControllerTestFixture.java | 6 +++--- 9 files changed, 15 insertions(+), 15 deletions(-) delete mode 100644 src/main/java/com/backend/blooming/authentication/presentation/dto/WithdrawRequest.java rename src/main/java/com/backend/blooming/authentication/presentation/dto/{ => request}/LogoutRequest.java (51%) rename src/main/java/com/backend/blooming/authentication/presentation/dto/{response => request}/SocialLoginRequest.java (52%) create mode 100644 src/main/java/com/backend/blooming/authentication/presentation/dto/request/WithdrawRequest.java rename src/main/java/com/backend/blooming/notification/presentation/dto/{ => response}/ReadNotificationsResponse.java (95%) diff --git a/src/main/java/com/backend/blooming/authentication/application/dto/LogoutDto.java b/src/main/java/com/backend/blooming/authentication/application/dto/LogoutDto.java index 0f4a427e..525f7bd8 100644 --- a/src/main/java/com/backend/blooming/authentication/application/dto/LogoutDto.java +++ b/src/main/java/com/backend/blooming/authentication/application/dto/LogoutDto.java @@ -1,6 +1,6 @@ package com.backend.blooming.authentication.application.dto; -import com.backend.blooming.authentication.presentation.dto.LogoutRequest; +import com.backend.blooming.authentication.presentation.dto.request.LogoutRequest; public record LogoutDto(String refreshToken, String deviceToken) { diff --git a/src/main/java/com/backend/blooming/authentication/presentation/AuthenticationController.java b/src/main/java/com/backend/blooming/authentication/presentation/AuthenticationController.java index dd008180..4d2de575 100644 --- a/src/main/java/com/backend/blooming/authentication/presentation/AuthenticationController.java +++ b/src/main/java/com/backend/blooming/authentication/presentation/AuthenticationController.java @@ -8,11 +8,11 @@ import com.backend.blooming.authentication.infrastructure.oauth.OAuthType; import com.backend.blooming.authentication.presentation.anotaion.Authenticated; import com.backend.blooming.authentication.presentation.argumentresolver.AuthenticatedUser; -import com.backend.blooming.authentication.presentation.dto.LogoutRequest; -import com.backend.blooming.authentication.presentation.dto.WithdrawRequest; +import com.backend.blooming.authentication.presentation.dto.request.LogoutRequest; +import com.backend.blooming.authentication.presentation.dto.request.WithdrawRequest; import com.backend.blooming.authentication.presentation.dto.request.ReissueAccessTokenRequest; import com.backend.blooming.authentication.presentation.dto.response.LoginInformationResponse; -import com.backend.blooming.authentication.presentation.dto.response.SocialLoginRequest; +import com.backend.blooming.authentication.presentation.dto.request.SocialLoginRequest; import com.backend.blooming.authentication.presentation.dto.response.TokenResponse; import lombok.RequiredArgsConstructor; import org.springframework.http.ResponseEntity; diff --git a/src/main/java/com/backend/blooming/authentication/presentation/dto/WithdrawRequest.java b/src/main/java/com/backend/blooming/authentication/presentation/dto/WithdrawRequest.java deleted file mode 100644 index 28807263..00000000 --- a/src/main/java/com/backend/blooming/authentication/presentation/dto/WithdrawRequest.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.backend.blooming.authentication.presentation.dto; - -public record WithdrawRequest(String refreshToken) { -} diff --git a/src/main/java/com/backend/blooming/authentication/presentation/dto/LogoutRequest.java b/src/main/java/com/backend/blooming/authentication/presentation/dto/request/LogoutRequest.java similarity index 51% rename from src/main/java/com/backend/blooming/authentication/presentation/dto/LogoutRequest.java rename to src/main/java/com/backend/blooming/authentication/presentation/dto/request/LogoutRequest.java index 71c90aa1..4095d68b 100644 --- a/src/main/java/com/backend/blooming/authentication/presentation/dto/LogoutRequest.java +++ b/src/main/java/com/backend/blooming/authentication/presentation/dto/request/LogoutRequest.java @@ -1,4 +1,4 @@ -package com.backend.blooming.authentication.presentation.dto; +package com.backend.blooming.authentication.presentation.dto.request; public record LogoutRequest(String refreshToken, String deviceToken) { } diff --git a/src/main/java/com/backend/blooming/authentication/presentation/dto/response/SocialLoginRequest.java b/src/main/java/com/backend/blooming/authentication/presentation/dto/request/SocialLoginRequest.java similarity index 52% rename from src/main/java/com/backend/blooming/authentication/presentation/dto/response/SocialLoginRequest.java rename to src/main/java/com/backend/blooming/authentication/presentation/dto/request/SocialLoginRequest.java index 34aca05e..cb075d83 100644 --- a/src/main/java/com/backend/blooming/authentication/presentation/dto/response/SocialLoginRequest.java +++ b/src/main/java/com/backend/blooming/authentication/presentation/dto/request/SocialLoginRequest.java @@ -1,4 +1,4 @@ -package com.backend.blooming.authentication.presentation.dto.response; +package com.backend.blooming.authentication.presentation.dto.request; public record SocialLoginRequest(String accessToken, String deviceToken) { } diff --git a/src/main/java/com/backend/blooming/authentication/presentation/dto/request/WithdrawRequest.java b/src/main/java/com/backend/blooming/authentication/presentation/dto/request/WithdrawRequest.java new file mode 100644 index 00000000..6d5d66bd --- /dev/null +++ b/src/main/java/com/backend/blooming/authentication/presentation/dto/request/WithdrawRequest.java @@ -0,0 +1,4 @@ +package com.backend.blooming.authentication.presentation.dto.request; + +public record WithdrawRequest(String refreshToken) { +} diff --git a/src/main/java/com/backend/blooming/notification/presentation/NotificationController.java b/src/main/java/com/backend/blooming/notification/presentation/NotificationController.java index 85b5cf48..35ec14fc 100644 --- a/src/main/java/com/backend/blooming/notification/presentation/NotificationController.java +++ b/src/main/java/com/backend/blooming/notification/presentation/NotificationController.java @@ -4,7 +4,7 @@ import com.backend.blooming.authentication.presentation.argumentresolver.AuthenticatedUser; import com.backend.blooming.notification.application.NotificationService; import com.backend.blooming.notification.application.dto.ReadNotificationsDto; -import com.backend.blooming.notification.presentation.dto.ReadNotificationsResponse; +import com.backend.blooming.notification.presentation.dto.response.ReadNotificationsResponse; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/src/main/java/com/backend/blooming/notification/presentation/dto/ReadNotificationsResponse.java b/src/main/java/com/backend/blooming/notification/presentation/dto/response/ReadNotificationsResponse.java similarity index 95% rename from src/main/java/com/backend/blooming/notification/presentation/dto/ReadNotificationsResponse.java rename to src/main/java/com/backend/blooming/notification/presentation/dto/response/ReadNotificationsResponse.java index 74b8bfde..38d65594 100644 --- a/src/main/java/com/backend/blooming/notification/presentation/dto/ReadNotificationsResponse.java +++ b/src/main/java/com/backend/blooming/notification/presentation/dto/response/ReadNotificationsResponse.java @@ -1,4 +1,4 @@ -package com.backend.blooming.notification.presentation.dto; +package com.backend.blooming.notification.presentation.dto.response; import com.backend.blooming.notification.application.dto.ReadNotificationsDto; diff --git a/src/test/java/com/backend/blooming/authentication/presentation/AuthenticationControllerTestFixture.java b/src/test/java/com/backend/blooming/authentication/presentation/AuthenticationControllerTestFixture.java index 683dd877..8a8cf038 100644 --- a/src/test/java/com/backend/blooming/authentication/presentation/AuthenticationControllerTestFixture.java +++ b/src/test/java/com/backend/blooming/authentication/presentation/AuthenticationControllerTestFixture.java @@ -6,10 +6,10 @@ import com.backend.blooming.authentication.application.dto.TokenDto; import com.backend.blooming.authentication.infrastructure.jwt.dto.AuthClaims; import com.backend.blooming.authentication.infrastructure.oauth.OAuthType; -import com.backend.blooming.authentication.presentation.dto.LogoutRequest; -import com.backend.blooming.authentication.presentation.dto.WithdrawRequest; +import com.backend.blooming.authentication.presentation.dto.request.LogoutRequest; +import com.backend.blooming.authentication.presentation.dto.request.WithdrawRequest; import com.backend.blooming.authentication.presentation.dto.request.ReissueAccessTokenRequest; -import com.backend.blooming.authentication.presentation.dto.response.SocialLoginRequest; +import com.backend.blooming.authentication.presentation.dto.request.SocialLoginRequest; @SuppressWarnings("NonAsciiCharacters") public class AuthenticationControllerTestFixture {