diff --git a/src/main/java/ac/knu/likeknu/controller/dto/device/request/DeviceRegistrationRequest.java b/src/main/java/ac/knu/likeknu/controller/dto/device/request/DeviceRegistrationRequest.java index 9e5f0ea..4a06019 100644 --- a/src/main/java/ac/knu/likeknu/controller/dto/device/request/DeviceRegistrationRequest.java +++ b/src/main/java/ac/knu/likeknu/controller/dto/device/request/DeviceRegistrationRequest.java @@ -1,6 +1,8 @@ package ac.knu.likeknu.controller.dto.device.request; +import ac.knu.likeknu.domain.constants.Campus; + public record DeviceRegistrationRequest( - String deviceId, String userAgent, String campus, String themeColor, String favoriteCafeteria + String deviceId, String userAgent, Campus campus, String themeColor, String favoriteCafeteria ) { } diff --git a/src/main/java/ac/knu/likeknu/domain/Device.java b/src/main/java/ac/knu/likeknu/domain/Device.java index 6b3108f..4d13a46 100644 --- a/src/main/java/ac/knu/likeknu/domain/Device.java +++ b/src/main/java/ac/knu/likeknu/domain/Device.java @@ -100,7 +100,7 @@ public void updateNotification(boolean isTurnOnNotification) { public void update(DeviceRegistrationRequest deviceRequest) { this.platform = deviceRequest.userAgent(); - this.campus = Campus.of(deviceRequest.campus()); + this.campus = deviceRequest.campus(); this.themeColor = deviceRequest.themeColor(); this.favoriteCafeteria = deviceRequest.favoriteCafeteria(); lastVisitedAt = LocalDateTime.now();