Skip to content

Commit

Permalink
refactor: member update logic 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonjy committed Jun 17, 2024
1 parent c2596d1 commit c61f0bd
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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 {
Expand All @@ -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)
Expand Down

0 comments on commit c61f0bd

Please sign in to comment.