diff --git a/backend/src/main/java/aimo/backend/common/mapper/PostMapper.java b/backend/src/main/java/aimo/backend/common/mapper/PostMapper.java index bdb413f..23784ae 100644 --- a/backend/src/main/java/aimo/backend/common/mapper/PostMapper.java +++ b/backend/src/main/java/aimo/backend/common/mapper/PostMapper.java @@ -81,7 +81,7 @@ public static FindPostAndCommentsByIdResponse toFindPostAndCommentsByIdResponse( return new FindPostAndCommentsByIdResponse( post.getMember() == member, post.getTitle(), - post.getMember().getUsername(), + post.getMember().getMemberName(), post.getSummaryAi(), post.getPostLikesCount(), post.getPostViewsCount(), diff --git a/backend/src/main/java/aimo/backend/domains/member/dto/SignUpRequest.java b/backend/src/main/java/aimo/backend/domains/member/dto/SignUpRequest.java index 68003dd..474ddba 100644 --- a/backend/src/main/java/aimo/backend/domains/member/dto/SignUpRequest.java +++ b/backend/src/main/java/aimo/backend/domains/member/dto/SignUpRequest.java @@ -5,16 +5,18 @@ import aimo.backend.domains.member.model.Gender; import jakarta.validation.constraints.Email; import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Past; public record SignUpRequest( @NotBlank(message = "userName이 빈 문자열입니다.") - String username, + String memberName, @Email(message = "email 형식이 아닙니다.") String email, @NotBlank(message = "password가 빈 문자열입니다.") String password, - @NotNull(message = "gender가 비었습니다.") + @NotNull(message = "gender가 비었습니다.") Gender gender, - @Past(message = "생년월일은 과거 날짜여야 합니다.") + @Past(message = "생년월일은 과거 날짜여야 합니다.") LocalDate birth ) {} diff --git a/backend/src/main/java/aimo/backend/domains/member/repository/MemberRepository.java b/backend/src/main/java/aimo/backend/domains/member/repository/MemberRepository.java index 782438b..0ca27c3 100644 --- a/backend/src/main/java/aimo/backend/domains/member/repository/MemberRepository.java +++ b/backend/src/main/java/aimo/backend/domains/member/repository/MemberRepository.java @@ -12,7 +12,7 @@ public interface MemberRepository extends JpaRepository { void deleteMemberByEmail(String email); - boolean existsByUsername(String username); + boolean existsByMemberName(String memberName); boolean existsByEmail(String email); } diff --git a/backend/src/main/java/aimo/backend/domains/member/service/MemberService.java b/backend/src/main/java/aimo/backend/domains/member/service/MemberService.java index 9386f71..f473b05 100644 --- a/backend/src/main/java/aimo/backend/domains/member/service/MemberService.java +++ b/backend/src/main/java/aimo/backend/domains/member/service/MemberService.java @@ -51,7 +51,7 @@ public void signUp(SignUpRequest signUpRequest) { validateDuplicateEmail(signUpRequest.email()); // 중복 닉네임 검사 - validateDuplicateUsername(signUpRequest.username()); + validateDuplicateUsername(signUpRequest.memberName()); Member member = memberMapper.signUpMemberEntity(signUpRequest); memberRepository.save(member); @@ -133,7 +133,7 @@ private void validateDuplicateEmail(String email) { // 닉네임 중복 검사 private void validateDuplicateUsername(String username) { - if (memberRepository.existsByUsername(username)) { + if (memberRepository.existsByMemberName(username)) { throw ApiException.from(ErrorCode.USERNAME_DUPLICATE); } } diff --git a/backend/src/main/java/aimo/backend/domains/privatePost/controller/PrivatePostController.java b/backend/src/main/java/aimo/backend/domains/privatePost/controller/PrivatePostController.java index e269ecf..817bf7a 100644 --- a/backend/src/main/java/aimo/backend/domains/privatePost/controller/PrivatePostController.java +++ b/backend/src/main/java/aimo/backend/domains/privatePost/controller/PrivatePostController.java @@ -21,6 +21,7 @@ import aimo.backend.domains.privatePost.dto.ChatRecordRequest; import aimo.backend.domains.privatePost.dto.PrivatePostPreviewResponse; import aimo.backend.domains.privatePost.dto.PrivatePostResponse; +import aimo.backend.domains.privatePost.dto.SaveAudioSuccessRequest; import aimo.backend.domains.privatePost.dto.SaveAudioSuccessResponse; import aimo.backend.domains.privatePost.dto.SpeachToTextRequest; import aimo.backend.domains.privatePost.dto.SpeachToTextResponse;