Skip to content

Commit

Permalink
feat: 회원가입 시 사용자 닉네임 입력 기능 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonjy committed Mar 19, 2024
1 parent 5038f29 commit f9ce058
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.rollthedice.backend.domain.member.dto;

import lombok.Getter;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@Getter
public class SignUpDto {
private String nickname;
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ public Member update(String email, String imageUrl) {
public void updateRefreshToken(String updateRefreshToken) {
this.refreshToken = updateRefreshToken;
}

public void updateNickname(String nickname) {
this.nickname = nickname;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.rollthedice.backend.domain.member.service;

import com.rollthedice.backend.domain.member.dto.SignUpDto;
import com.rollthedice.backend.domain.member.entity.Member;
import com.rollthedice.backend.domain.member.query.AuthService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@RequiredArgsConstructor
@Service
public class MemberService {
private final AuthService authService;

public void signUp(SignUpDto dto) {
Member member = authService.getMember();
member.updateNickname(dto.getNickname());
}
}

0 comments on commit f9ce058

Please sign in to comment.