Skip to content

Commit

Permalink
feat #77 : change CheckUsername API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
seonpilKim committed Oct 9, 2024
1 parent 243bbeb commit 031aa78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class CheckUsernameController implements AuthApi {

@Operation(summary = "checkUsername API", description = "Check if the username exists.")
@Parameter(name = "username", description = "Username in Email format.", required = true)
@GetMapping(value = "/members/check", produces = MediaType.APPLICATION_JSON_VALUE)
@GetMapping(value = "/accounts/check", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<CheckUsernameResponseBody> checkUsername(@NotBlank @Email @Length(max = 30) @RequestParam String username) {
final CheckUsernameUseCase.Result result = this.checkUsernameUseCase.invoke(CheckUsernameUseCase.Command.builder().username(username).build());
final TiTiAuthBusinessCodes businessCodes = result.isPresent() ? TiTiAuthBusinessCodes.ALREADY_EXISTS_USERNAME : TiTiAuthBusinessCodes.DOES_NOT_EXIST_USERNAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private static Stream<Arguments> whenSuccessToCheckUsername() {
}

private ResultActions mockCheckUsername(String username) throws Exception {
return mockMvc.perform(get("/api/auth/members/check")
return mockMvc.perform(get("/api/auth/accounts/check")
.queryParam("username", username)
.accept(MediaType.APPLICATION_JSON)
.with(csrf()));
Expand Down

0 comments on commit 031aa78

Please sign in to comment.