Skip to content

Commit

Permalink
feat: 채팅 요청 수락 API, 응답 데이터 제공토록 수정(#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
Minjae-An committed May 30, 2024
1 parent 84cfe8d commit bb592ad
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.springframework.web.bind.annotation.ResponseBody;
import yeonba.be.chatting.dto.request.ChatPublishRequest;
import yeonba.be.chatting.dto.response.ChatMessageResponse;
import yeonba.be.chatting.dto.response.ChatRequestAcceptResponse;
import yeonba.be.chatting.dto.response.ChatRoomResponse;
import yeonba.be.chatting.service.ChatService;
import yeonba.be.util.CustomResponse;
Expand Down Expand Up @@ -86,16 +87,17 @@ public ResponseEntity<CustomResponse<Void>> requestChat(
@ApiResponse(responseCode = "200", description = "채팅 요청 수락 정상 처리")
@ResponseBody
@PostMapping("/notifications/{notificationId}/chat")
public ResponseEntity<CustomResponse<Void>> acceptRequestedChat(
public ResponseEntity<CustomResponse<ChatRequestAcceptResponse>> acceptRequestedChat(
@RequestAttribute("userId") long userId,
@Parameter(description = "알림 ID", example = "1")
@PathVariable long notificationId) {

chatService.acceptRequestedChat(userId, notificationId);
ChatRequestAcceptResponse response = chatService.acceptRequestedChat(userId,
notificationId);

return ResponseEntity
.ok()
.body(new CustomResponse<>());
.body(new CustomResponse<>(response));
}

@Operation(summary = "채팅방 나가기", description = "채팅방을 나갈 수 있습니다.")
Expand Down

0 comments on commit bb592ad

Please sign in to comment.