From 356f9f3a72392eb0d60b9a6d87a11a991a90a0fd Mon Sep 17 00:00:00 2001 From: takoyakimchi Date: Fri, 16 Aug 2024 11:29:36 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20ChatRoomController=20=EA=B3=B5?= =?UTF-8?q?=ED=86=B5=20=EC=9D=91=EB=8B=B5=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../friendogly/chat/controller/ChatRoomController.java | 7 +++++-- .../com/happy/friendogly/docs/ChatRoomApiDocsTest.java | 9 +++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/com/happy/friendogly/chat/controller/ChatRoomController.java b/backend/src/main/java/com/happy/friendogly/chat/controller/ChatRoomController.java index d83922585..d2fe2d3ef 100644 --- a/backend/src/main/java/com/happy/friendogly/chat/controller/ChatRoomController.java +++ b/backend/src/main/java/com/happy/friendogly/chat/controller/ChatRoomController.java @@ -42,8 +42,11 @@ public ApiResponse findMine(@Auth Long memberId) { } @GetMapping("/{chatRoomId}") - public List findMemberInfo(@Auth Long memberId, @PathVariable Long chatRoomId) { - return chatRoomQueryService.findMemberInfo(memberId, chatRoomId); + public ApiResponse> findMemberInfo( + @Auth Long memberId, + @PathVariable Long chatRoomId + ) { + return ApiResponse.ofSuccess(chatRoomQueryService.findMemberInfo(memberId, chatRoomId)); } @GetMapping("/{chatRoomId}/club") diff --git a/backend/src/test/java/com/happy/friendogly/docs/ChatRoomApiDocsTest.java b/backend/src/test/java/com/happy/friendogly/docs/ChatRoomApiDocsTest.java index c953fda81..6f7a8f579 100644 --- a/backend/src/test/java/com/happy/friendogly/docs/ChatRoomApiDocsTest.java +++ b/backend/src/test/java/com/happy/friendogly/docs/ChatRoomApiDocsTest.java @@ -152,10 +152,11 @@ void findMemberInfo() throws Exception { parameterWithName("chatRoomId").description("채팅방 ID") ) .responseFields( - fieldWithPath("[].isOwner").description("채팅방 ID"), - fieldWithPath("[].memberId").description("채팅방 현재 인원"), - fieldWithPath("[].memberName").description("모임 이름"), - fieldWithPath("[].memberProfileImageUrl").description("모임 이미지 URL") + fieldWithPath("isSuccess").description("응답 성공 여부"), + fieldWithPath("data.[].isOwner").description("채팅방 ID"), + fieldWithPath("data.[].memberId").description("채팅방 현재 인원"), + fieldWithPath("data.[].memberName").description("모임 이름"), + fieldWithPath("data.[].memberProfileImageUrl").description("모임 이미지 URL") ) .responseSchema(Schema.schema("FindChatRoomMembersInfoResponse")) .build()