Skip to content

Commit

Permalink
[BE] FIX: 유저 프로필 조회 시 연장관 관련 정보 삭제
Browse files Browse the repository at this point in the history
상점 도입 이후 뷰에서 사용하지 않는 정보 제거
  • Loading branch information
saewoo1 committed Jan 11, 2025
1 parent 5ecf626 commit cf5df83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public interface UserMapper {
@Mapping(target = "cabinetId", source = "cabinet.id")
MyProfileResponseDto toMyProfileResponseDto(UserSessionDto user,
Cabinet cabinet, BanHistory banHistory,
LentExtensionResponseDto lentExtensionResponseDto,
AlarmTypeResponseDto alarmTypes, boolean isDeviceTokenExpired, Long coins);

BlockedUserPaginationDto toBlockedUserPaginationDto(List<UserBlockedInfoDto> result,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,13 @@ public MyProfileResponseDto getProfile(UserSessionDto user) {
Cabinet cabinet = cabinetQueryService.findUserActiveCabinet(userId);
BanHistory banHistory = banHistoryQueryService.findRecentActiveBanHistory(userId,
LocalDateTime.now()).orElse(null);
LentExtension lentExtension = lentExtensionQueryService.findActiveLentExtension(
userId);
LentExtensionResponseDto lentExtensionResponseDto = userMapper.toLentExtensionResponseDto(
lentExtension);
User currentUser = userQueryService.getUser(userId);
AlarmTypeResponseDto userAlarmTypes = currentUser.getAlarmTypes();
boolean isDeviceTokenExpired = userAlarmTypes.isPush()
&& fcmTokenRedisService.findByUserName(user.getName()).isEmpty();
Long coins = currentUser.getCoin();
return userMapper.toMyProfileResponseDto(user, cabinet, banHistory,
lentExtensionResponseDto, userAlarmTypes, isDeviceTokenExpired, coins);
return userMapper.toMyProfileResponseDto(user, cabinet, banHistory, userAlarmTypes,
isDeviceTokenExpired, coins);
}

/**
Expand Down

0 comments on commit cf5df83

Please sign in to comment.