Skip to content

Commit

Permalink
fix: device campus type
Browse files Browse the repository at this point in the history
  • Loading branch information
jcw1031 committed Apr 20, 2024
1 parent 698e5ca commit 4289ebc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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
) {
}
2 changes: 1 addition & 1 deletion src/main/java/ac/knu/likeknu/domain/Device.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4289ebc

Please sign in to comment.