Skip to content

Commit

Permalink
Merge pull request #75 from KOA-TF/feat/auth
Browse files Browse the repository at this point in the history
refactor : HTTP 메서드 수정
  • Loading branch information
isprogrammingfun authored Feb 6, 2024
2 parents d5cc00c + 3b3e8f9 commit 3e786ef
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class AuthController {
private final AuthUseCase authUseCase;
private final LogoutUseCase logoutUseCase;

@GetMapping("/login/{authority}")
@PostMapping("/login/{authority}")
public ApplicationResponse<AuthResponse> authLogin(@PathVariable Authority authority, @RequestBody LoginRequest loginRequest){
AuthResponse response = authUseCase.authLogin(authority, loginRequest);
return ApplicationResponse.ok(response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public ApplicationResponse<Void> postVerifyEmail(@RequestBody VerifyEmailRequest
return ApplicationResponse.ok(null);
}

@GetMapping("/verify/code")
@PostMapping("/verify/code")
public ApplicationResponse<VerifyCodeResponse> verifyCode(@RequestBody VerifyCodeRequest verifyCodeRequest) {
VerifyCodeResponse response = emailVerificationUseCase.verifyCode(verifyCodeRequest);
return ApplicationResponse.ok(response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
Expand All @@ -42,19 +43,19 @@ public ApplicationResponse<MemberInfoResponse> getMemberInfo(){
return ApplicationResponse.ok(response);
}

@GetMapping("/check/register")
@PostMapping("/check/register")
public ApplicationResponse<CheckRegisterResponse> checkMemberRegistered(@RequestBody MemberRegisterRequest memberRegisterRequest) {
CheckRegisterResponse response = memberCheckUseCase.checkMemberRegistered(memberRegisterRequest);
return ApplicationResponse.ok(response);
}

@GetMapping("/register")
@PostMapping("/register")
public ApplicationResponse<Void> getMemberRegister(@RequestBody MemberRegisterRequest memberRegisterRequest){
memberRegisterUseCase.registerMember(memberRegisterRequest);
return ApplicationResponse.ok(null);
}

@GetMapping("/email")
@PostMapping("/email")
public ApplicationResponse<CheckEmailResponse> checkEmail(@RequestBody CheckEmailRequest checkEmailRequest) {
CheckEmailResponse response = memberCheckUseCase.checkEmail(checkEmailRequest);
return ApplicationResponse.ok(response);
Expand All @@ -66,7 +67,7 @@ public ApplicationResponse<Void> deleteMember(){
return ApplicationResponse.ok(null);
}

@GetMapping("/password")
@PostMapping("/password")
public ApplicationResponse<CheckPasswordResponse> checkPassword(@RequestBody CheckPasswordRequest checkPasswordRequest) {
CheckPasswordResponse response = memberCheckUseCase.checkPassword(checkPasswordRequest);
return ApplicationResponse.ok(response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ private static Map<String, Set<HttpMethod>> createIgnoredPathMap() {
Map<String, Set<HttpMethod>> map = new LinkedHashMap<>();

map.put("/v1/auth/reissue", Set.of(HttpMethod.GET));
map.put("/v1/member/register", Set.of(HttpMethod.GET));
map.put("/v1/member/check/register", Set.of(HttpMethod.GET));
map.put("/v1/member/register", Set.of(HttpMethod.POST));
map.put("/v1/member/check/register", Set.of(HttpMethod.POST));
map.put("/h2-console/**", Set.of(HttpMethod.GET, HttpMethod.POST));
map.put("/v1/auth/login/**", Set.of(HttpMethod.GET, HttpMethod.POST));
map.put("/v1/member/email", Set.of(HttpMethod.GET));
map.put("/v1/member/email", Set.of(HttpMethod.POST));
map.put("/v1/member/verify", Set.of(HttpMethod.POST));
map.put("/v1/member/verify/code", Set.of(HttpMethod.GET));
map.put("/v1/member/verify/code", Set.of(HttpMethod.POST));
map.put("/v1/member/password/unauthenticated", Set.of(HttpMethod.PUT));
map.put("/api-docs/**", Set.of(HttpMethod.GET, HttpMethod.POST));
map.put("/error", Set.of(HttpMethod.GET, HttpMethod.POST));
Expand Down

0 comments on commit 3e786ef

Please sign in to comment.