Skip to content

Commit

Permalink
YEL-153 [hotfix] deviceToken 공스트링 처리 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
myheyjay authored and euije committed Sep 12, 2023
1 parent e4f283f commit 1d38bd2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/com/yello/server/domain/user/entity/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.yello.server.domain.group.entity.School;
import com.yello.server.global.common.dto.AuditingTimeEntity;
import java.time.LocalDateTime;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
Expand Down Expand Up @@ -121,7 +122,7 @@ public static User of(SignUpRequest signUpRequest, School group) {
.group(group)
.groupAdmissionYear(signUpRequest.groupAdmissionYear())
.email(signUpRequest.email())
.deviceToken(signUpRequest.deviceToken().isEmpty() ? null : signUpRequest.deviceToken())
.deviceToken(Objects.equals(signUpRequest.deviceToken(), "") ? null : signUpRequest.deviceToken())
.subscribe(Subscribe.NORMAL)
.ticketCount(0)
.build();
Expand Down Expand Up @@ -182,7 +183,7 @@ public String getDeviceToken() {
}

public void setDeviceToken(String deviceToken) {
if (deviceToken.isEmpty()) {
if (Objects.equals(deviceToken, "")) {
this.deviceToken = null;
} else {
this.deviceToken = deviceToken;
Expand Down

0 comments on commit 1d38bd2

Please sign in to comment.