Skip to content

Commit

Permalink
Merge pull request #151 from kakao-tech-campus-2nd-step3/refactor/Pla…
Browse files Browse the repository at this point in the history
…cesResponse

[refactor] #149 PlacesResponse 형식 변환
  • Loading branch information
sanghee0820 authored Nov 13, 2024
2 parents 8770a16 + d118660 commit 8602efb
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
package team7.inplace.place.presentation.dto;

import com.fasterxml.jackson.annotation.JsonValue;
import org.springframework.data.domain.Page;
import team7.inplace.place.application.dto.PlaceInfo;

public record PlacesResponse(Page<PlaceInfo> places) {

@JsonValue
public Page<PlaceInfo> asContents() {
return places;
}

public static PlacesResponse of(Page<PlaceInfo> places) {
return new PlacesResponse(places);
}
Expand Down

0 comments on commit 8602efb

Please sign in to comment.