Skip to content

Commit

Permalink
!hotfix: 홈화면 조회 API Noti List reverse 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
daeun084 committed Jul 31, 2024
1 parent dd7d2a4 commit 79f20df
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/java/makar/dev/converter/UserConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,24 @@
import makar.dev.dto.response.UserResponse;

import java.util.Collections;
import java.util.List;

public class UserConverter {

public static UserResponse.HomeDto toRouteSetHomeDto(NotiResponse.NotiListDto notiListDto, Route route){
Collections.reverse(notiListDto.getMakarNotiDtoList());
Collections.reverse(notiListDto.getGetoffNotiDtoList());
List<NotiResponse.NotiDto> makarNotiDtoList = notiListDto.getMakarNotiDtoList();
List<NotiResponse.NotiDto> getOffNotiList = notiListDto.getGetoffNotiDtoList();
Collections.reverse(makarNotiDtoList);
Collections.reverse(getOffNotiList);

return UserResponse.HomeDto.builder()
.isRouteSet(true)
.sourceStationName(route.getSourceStation().getStationName())
.destinationStationName(route.getDestinationStation().getStationName())
.makarTime(route.getSchedule().getSourceTime())
.getOffTime(route.getSchedule().getDestinationTime())
.makarNotiList(notiListDto.getMakarNotiDtoList())
.getOffNotiList(notiListDto.getGetoffNotiDtoList())
.makarNotiList(makarNotiDtoList)
.getOffNotiList(getOffNotiList)
.build();
}

Expand Down

0 comments on commit 79f20df

Please sign in to comment.