From 75cccd66b9e8e9a40ec978418b1cc385f303c01d Mon Sep 17 00:00:00 2001 From: Jinwoo Lee Date: Thu, 12 Oct 2023 14:32:51 +0900 Subject: [PATCH] fix: add import line --- .../repl/gifthub/auth/controller/UserController.java | 10 ++++++---- .../gifthub/auth/controller/UserControllerTest.java | 9 +++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/swmaestro/repl/gifthub/auth/controller/UserController.java b/src/main/java/org/swmaestro/repl/gifthub/auth/controller/UserController.java index 4f8fc942..5de41036 100644 --- a/src/main/java/org/swmaestro/repl/gifthub/auth/controller/UserController.java +++ b/src/main/java/org/swmaestro/repl/gifthub/auth/controller/UserController.java @@ -11,8 +11,10 @@ import org.springframework.web.bind.annotation.RestController; import org.swmaestro.repl.gifthub.auth.dto.MemberDeleteResponseDto; import org.swmaestro.repl.gifthub.auth.dto.MemberUpdateRequestDto; +import org.swmaestro.repl.gifthub.auth.dto.OAuthTokenDto; import org.swmaestro.repl.gifthub.auth.entity.Member; import org.swmaestro.repl.gifthub.auth.service.MemberService; +import org.swmaestro.repl.gifthub.auth.service.OAuthService; import org.swmaestro.repl.gifthub.auth.type.OAuthPlatform; import org.swmaestro.repl.gifthub.exception.BusinessException; import org.swmaestro.repl.gifthub.util.JwtProvider; @@ -81,8 +83,8 @@ public ResponseEntity readMember(HttpServletRequest request, @PathVaria .data(memberService.read(userId)) .build()); } - - @PostMapping("/oauth/{platform}") + + @PostMapping("/oauth/{platform}") @Operation(summary = "OAuth 연동 계정 추가 메서드", description = "사용자의 기존 계정에 OAuth 계정을 추가 연동하기 위한 메서드입니다.\n 파라미터로는 'naver', 'kakao', 'google', 'apple'를 받을 수 있습니다.") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OAuth 연동 계정 추가 성공"), @@ -107,8 +109,8 @@ public ResponseEntity createOAuthInfo(HttpServletRequest request, @Path .path(request.getRequestURI()) .build()); } - - @DeleteMapping("/oauth/{platform}") + + @DeleteMapping("/oauth/{platform}") @Operation(summary = "OAuth 연동 계정 삭제 메서드", description = "사용자의 기존 계정에 연동된 OAuth 계정을 삭제하기 위한 메서드입니다.\n 파라미터로는 'naver', 'kakao', 'google', 'apple'를 받을 수 있습니다.") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OAuth 연동 계정 삭제 성공"), diff --git a/src/test/java/org/swmaestro/repl/gifthub/auth/controller/UserControllerTest.java b/src/test/java/org/swmaestro/repl/gifthub/auth/controller/UserControllerTest.java index a062bcca..6d45026e 100644 --- a/src/test/java/org/swmaestro/repl/gifthub/auth/controller/UserControllerTest.java +++ b/src/test/java/org/swmaestro/repl/gifthub/auth/controller/UserControllerTest.java @@ -16,6 +16,7 @@ import org.swmaestro.repl.gifthub.auth.dto.MemberReadResponseDto; import org.swmaestro.repl.gifthub.auth.dto.MemberUpdateRequestDto; import org.swmaestro.repl.gifthub.auth.dto.MemberUpdateResponseDto; +import org.swmaestro.repl.gifthub.auth.dto.OAuthTokenDto; import org.swmaestro.repl.gifthub.auth.entity.Member; import org.swmaestro.repl.gifthub.auth.entity.OAuth; import org.swmaestro.repl.gifthub.auth.service.MemberService; @@ -103,8 +104,8 @@ void readMember() throws Exception { .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()); } - - @Test + + @Test @WithMockUser(username = "이진우", roles = "USER") void createOAuthInfo() throws Exception { // given @@ -136,8 +137,8 @@ void createOAuthInfo() throws Exception { .content(objectMapper.writeValueAsString(oAuthTokenDto))) .andExpect(status().isOk()); } - - @Test + + @Test @WithMockUser(username = "이진우", roles = "USER") void deleteOAuthInfo() throws Exception { // given