Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add fcmService when CreatingWebcamRoom #40

Merged
merged 2 commits into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@
import vom.spring.domain.webcam.dto.WebcamRequestDto;
import vom.spring.domain.webcam.dto.WebcamResponseDto;
import vom.spring.domain.webcam.service.WebcamServcie;
import vom.spring.domain.webpush.service.FcmService;

import java.io.IOException;

@Tag(name = "화상채팅(시그널링) API", description = "화상채팅 API 명세서")
@RestController
@RequiredArgsConstructor
@Slf4j
public class WebcamController {
private final WebcamServcie webcamServcie;
private final FcmService fcmService;
// private final SimpMessagingTemplate messagingTemplate;
/**
* 방 생성
Expand All @@ -41,8 +45,9 @@ public class WebcamController {
content = @Content(schema = @Schema(implementation = ErrorResponse.class)))
})
@PostMapping("/api/webcam")
public ResponseEntity<WebcamResponseDto.CreateWebcamDto> createWebcamRoom(@RequestBody WebcamRequestDto.CreateWebcamDto request) {
public ResponseEntity<WebcamResponseDto.CreateWebcamDto> createWebcamRoom(@RequestBody WebcamRequestDto.CreateWebcamDto request) throws IOException {
WebcamResponseDto.CreateWebcamDto response = webcamServcie.createWebcamRoom(request);
fcmService.sendMessageTo(request.getToMemberId());
return ResponseEntity.status(HttpStatus.OK).body(response);
}
/**
Expand Down
Loading