Skip to content

Commit

Permalink
Merge c55c013 into 62a5b24
Browse files Browse the repository at this point in the history
  • Loading branch information
EunjiShin authored Jul 17, 2024
2 parents 62a5b24 + c55c013 commit dca173f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public List<StadiumHomeTeamInfoResponse> findAllStadiums() {
public List<StadiumNameInfoResponse> findAllNames() {
List<StadiumNameInfo> infos = stadiumReadUsecase.findAllNames();
return infos.stream()
.map(t -> new StadiumNameInfoResponse(t.getId(), t.getName()))
.map(t -> new StadiumNameInfoResponse(t.getId(), t.getName(), t.isActive()))
.toList();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package org.depromeet.spot.application.stadium.dto.response;

public record StadiumNameInfoResponse(Long id, String name) {}
public record StadiumNameInfoResponse(Long id, String name, boolean isActive) {}
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ class StadiumInfoWithSeatChart {
class StadiumNameInfo {
private final Long id;
private final String name;
private final boolean isActive;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public List<StadiumHomeTeamInfo> findAllStadiums() {
@Override
public List<StadiumNameInfo> findAllNames() {
List<Stadium> stadiums = stadiumRepository.findAll();
return stadiums.stream().map(s -> new StadiumNameInfo(s.getId(), s.getName())).toList();
return stadiums.stream()
.map(s -> new StadiumNameInfo(s.getId(), s.getName(), s.isActive()))
.toList();
}

@Override
Expand Down

0 comments on commit dca173f

Please sign in to comment.