diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/member/service/MemberService.java b/backend/core/src/main/java/com/rollthedice/backend/domain/member/service/MemberService.java index ea9e1072..1b5a1962 100644 --- a/backend/core/src/main/java/com/rollthedice/backend/domain/member/service/MemberService.java +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/member/service/MemberService.java @@ -1,6 +1,7 @@ package com.rollthedice.backend.domain.member.service; import com.rollthedice.backend.domain.member.dto.MemberServiceDto; +import com.rollthedice.backend.domain.member.dto.MemberUpdateDto; import com.rollthedice.backend.domain.member.dto.response.MemberResponse; import com.rollthedice.backend.domain.member.entity.Member; import com.rollthedice.backend.domain.member.exception.MemberNotFoundException; @@ -11,9 +12,11 @@ import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +@Slf4j @RequiredArgsConstructor @Service public class MemberService { @@ -27,8 +30,9 @@ public boolean isDuplicatedNickname(MemberServiceDto memberServiceDto) { } @Transactional - public void update(MemberServiceDto memberServiceDto) { - findByEmail(memberServiceDto.getEmail()).update(memberServiceDto); + public void update(MemberUpdateDto memberUpdateDto) { + Member loginMember = authService.getMember(); + loginMember.signUp(memberUpdateDto.getNickname()); } @Transactional(readOnly = true)