Skip to content

Commit

Permalink
Merge pull request #254 from haedoang/feature/report
Browse files Browse the repository at this point in the history
refact: 지역 API 정렬 추가
  • Loading branch information
haedoang authored Dec 26, 2023
2 parents d6da3ec + 7bc4b1e commit f000cb9
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.koliving.api.location.application.dto.LocationUpdateRequest;
import com.koliving.api.location.domain.Location;
import com.koliving.api.location.infra.LocationRepository;
import java.util.Comparator;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
Expand Down Expand Up @@ -46,6 +47,7 @@ public LocationResponse findOne(Long id) {
public List<LocationResponse> findAll() {
return locationRepository.findAll()
.stream()
.sorted(Comparator.comparing(Location::getName))
.map(LocationResponse::valueOf)
.collect(Collectors.toList());
}
Expand Down

0 comments on commit f000cb9

Please sign in to comment.