diff --git a/backend/src/main/java/com/funeat/auth/dto/SignUserDto.java b/backend/src/main/java/com/funeat/auth/dto/SignUserDto.java index 170ef9591..2e910ee77 100644 --- a/backend/src/main/java/com/funeat/auth/dto/SignUserDto.java +++ b/backend/src/main/java/com/funeat/auth/dto/SignUserDto.java @@ -4,20 +4,20 @@ public class SignUserDto { - private final boolean isSignIn; + private final boolean isSignUp; private final Member member; - public SignUserDto(final boolean isSignIn, final Member member) { - this.isSignIn = isSignIn; + public SignUserDto(final boolean isSignUp, final Member member) { + this.isSignUp = isSignUp; this.member = member; } - public static SignUserDto of(final boolean isSignIn, final Member member) { - return new SignUserDto(isSignIn, member); + public static SignUserDto of(final boolean isSignUp, final Member member) { + return new SignUserDto(isSignUp, member); } - public boolean isSignIn() { - return isSignIn; + public boolean isSignUp() { + return isSignUp; } public Member getMember() { diff --git a/backend/src/main/java/com/funeat/auth/presentation/AuthApiController.java b/backend/src/main/java/com/funeat/auth/presentation/AuthApiController.java index 98c1a9f29..dc7aadf8b 100644 --- a/backend/src/main/java/com/funeat/auth/presentation/AuthApiController.java +++ b/backend/src/main/java/com/funeat/auth/presentation/AuthApiController.java @@ -35,13 +35,13 @@ public ResponseEntity loginAuthorizeUser(@RequestParam("code") final Strin final Long memberId = signUserDto.getMember().getId(); request.getSession().setAttribute("member", memberId); - if (signUserDto.isSignIn()) { + if (signUserDto.isSignUp()) { return ResponseEntity.ok() - .location(URI.create("/")) + .location(URI.create("/profile")) .build(); } return ResponseEntity.ok() - .location(URI.create("/profile")) + .location(URI.create("/")) .build(); } diff --git a/backend/src/test/java/com/funeat/auth/presentation/AuthApiControllerTest.java b/backend/src/test/java/com/funeat/auth/presentation/AuthApiControllerTest.java index 379a4c580..9e36ba822 100644 --- a/backend/src/test/java/com/funeat/auth/presentation/AuthApiControllerTest.java +++ b/backend/src/test/java/com/funeat/auth/presentation/AuthApiControllerTest.java @@ -33,7 +33,7 @@ class loginAuthorizeUser_테스트 { // given final var code = "test"; final var member = new Member("test", "www.test.com", "1"); - final var signUserDto = SignUserDto.of(true, member); + final var signUserDto = SignUserDto.of(false, member); // when when(authService.loginWithKakao(code)).thenReturn(signUserDto); @@ -50,7 +50,7 @@ class loginAuthorizeUser_테스트 { // given final var code = "test"; final var member = new Member("test", "www.test.com", "1"); - final var signUserDto = SignUserDto.of(false, member); + final var signUserDto = SignUserDto.of(true, member); // when when(authService.loginWithKakao(code)).thenReturn(signUserDto); diff --git a/backend/src/test/java/com/funeat/member/application/MemberServiceTest.java b/backend/src/test/java/com/funeat/member/application/MemberServiceTest.java index c79ccfe05..f5ed7f1a5 100644 --- a/backend/src/test/java/com/funeat/member/application/MemberServiceTest.java +++ b/backend/src/test/java/com/funeat/member/application/MemberServiceTest.java @@ -50,7 +50,7 @@ class findOrCreateMember_테스트 { // then assertSoftly(softAssertions -> { - Assertions.assertFalse(actual.isSignIn()); + Assertions.assertFalse(actual.isSignUp()); assertThat(expected).containsExactly(actual.getMember()); }); } @@ -69,7 +69,7 @@ class findOrCreateMember_테스트 { // then assertSoftly(softAssertions -> { - Assertions.assertTrue(actual.isSignIn()); + Assertions.assertTrue(actual.isSignUp()); assertThat(expected).doesNotContain(actual.getMember()); }); }