From b5580db829de688d4208f9b21ccf5982625005d2 Mon Sep 17 00:00:00 2001 From: isanghaessi Date: Sat, 27 Apr 2024 18:58:20 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20relationship=20=EA=B2=80=EC=83=89=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - favoriteYn이 enum default 값이라 응답에 포함되지 않는 버그 수정. --- .../common/protocolbuffer/ProtocolBufferUtil.java | 10 ++++++++++ ...elationshipGetByNicknameKeywordWithSortHandler.java | 1 + 2 files changed, 11 insertions(+) diff --git a/src/main/java/com/beside/startrail/common/protocolbuffer/ProtocolBufferUtil.java b/src/main/java/com/beside/startrail/common/protocolbuffer/ProtocolBufferUtil.java index 4c1d3b0..8b050e9 100644 --- a/src/main/java/com/beside/startrail/common/protocolbuffer/ProtocolBufferUtil.java +++ b/src/main/java/com/beside/startrail/common/protocolbuffer/ProtocolBufferUtil.java @@ -5,6 +5,8 @@ import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.Message; import com.google.protobuf.util.JsonFormat; +import java.util.Collection; +import java.util.stream.Collectors; import org.springframework.util.MultiValueMap; import reactor.core.publisher.Mono; @@ -39,6 +41,14 @@ public static String print(Message message) { } } + public static String printAll(Collection messages) { + return "[" + + messages.stream() + .map(ProtocolBufferUtil::print) + .collect(Collectors.joining(",")) + + "]"; + } + @SuppressWarnings("unchecked") public static Mono from( MultiValueMap multiValueMap, diff --git a/src/main/java/com/beside/startrail/relationship/handler/RelationshipGetByNicknameKeywordWithSortHandler.java b/src/main/java/com/beside/startrail/relationship/handler/RelationshipGetByNicknameKeywordWithSortHandler.java index 0be2f9b..c13dead 100644 --- a/src/main/java/com/beside/startrail/relationship/handler/RelationshipGetByNicknameKeywordWithSortHandler.java +++ b/src/main/java/com/beside/startrail/relationship/handler/RelationshipGetByNicknameKeywordWithSortHandler.java @@ -90,6 +90,7 @@ protected Mono signedHandle(ServerRequest serverRequest) { ) ) .collectList() + .map(ProtocolBufferUtil::printAll) .flatMap(body -> ServerResponse .ok()