feat: video

This commit is contained in:
박정민 2024-07-29 15:18:37 +09:00
parent bcf36665f9
commit 764f5bd30d

View File

@ -99,10 +99,10 @@ public class Controller {
LectureDetailResponse lecture= lectureService.findLectureById(userId,id); LectureDetailResponse lecture= lectureService.findLectureById(userId,id);
RegistrationStatus registrationStatus = registrationService.isOnline(userId,id); //RegistrationStatus registrationStatus = registrationService.isOnline(userId,id);
if(registrationStatus==RegistrationStatus.ACCEPTED) // if(registrationStatus==RegistrationStatus.ACCEPTED)
{ // {
String roomName = lecture.getTitle(); String roomName = lecture.getTitle();
String participantName = userService.getUserName(userId); String participantName = userService.getUserName(userId);
@ -112,16 +112,16 @@ public class Controller {
token.setIdentity(participantName); token.setIdentity(participantName);
token.addGrants(new RoomJoin(true), new RoomName(roomName)); token.addGrants(new RoomJoin(true), new RoomName(roomName));
videoSertvice.startOnline(userId,id); //videoSertvice.startOnline(userId,id);
return ResponseEntity.ok(Map.of("token", token.toJwt())); return ResponseEntity.ok(Map.of("token", token.toJwt()));
} // }
else{ // else{
return ResponseEntity.status(HttpStatus.FORBIDDEN).body(Map.of("errorMessage", "Not accepted")); // return ResponseEntity.status(HttpStatus.FORBIDDEN).body(Map.of("errorMessage", "Not accepted"));
//
} // }