Skip to content

Commit

Permalink
fix: 오탈자 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
mangowhoiscloud committed Nov 3, 2024
1 parent de9aee9 commit 1ca8bcc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
) {}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public interface MemberRepository extends JpaRepository<Member, Long> {

void deleteMemberByEmail(String email);

boolean existsByUsername(String username);
boolean existsByMemberName(String memberName);

boolean existsByEmail(String email);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1ca8bcc

Please sign in to comment.