Skip to content

Commit

Permalink
[BE] refactor: ChatRoomController 공통 응답 적용 (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
takoyakimchi authored Aug 20, 2024
1 parent 518a7ed commit 89d0fda
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ public ApiResponse<FindMyChatRoomResponse> findMine(@Auth Long memberId) {
}

@GetMapping("/{chatRoomId}")
public List<FindChatRoomMembersInfoResponse> findMemberInfo(@Auth Long memberId, @PathVariable Long chatRoomId) {
return chatRoomQueryService.findMemberInfo(memberId, chatRoomId);
public ApiResponse<List<FindChatRoomMembersInfoResponse>> findMemberInfo(
@Auth Long memberId,
@PathVariable Long chatRoomId
) {
return ApiResponse.ofSuccess(chatRoomQueryService.findMemberInfo(memberId, chatRoomId));
}

@GetMapping("/{chatRoomId}/club")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 89d0fda

Please sign in to comment.