Skip to content

Commit

Permalink
feat(user): 유저 생성시 이름에 24 있으면 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobhboy committed Apr 29, 2024
1 parent b4aa652 commit b435a59
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class User {
private Profile profile;

public User(String name, String email) {
this.name = name;
this.name = delete24InName(name);
this.email = email;
this.role = Role.USER;

Expand All @@ -62,10 +62,8 @@ public User(String name, String email) {
}
}

public User(String name, String email, Long cardinal) {
this.name = name;
this.email = email;
this.cardinal = cardinal;
private String delete24InName(String name) {
return name.replace("24", "");
}

public void updateProfile(Profile profile) {
Expand All @@ -77,7 +75,7 @@ public void updateContact(Contact contact) {
}

public void update(User user) {
this.email = user.getEmail();
this.name = user.getName();
this.email = user.getEmail();
}
}

0 comments on commit b435a59

Please sign in to comment.