mirror of https://github.com/sualko/cloud_bbb
fix: log failing api request
parent
bde396ed4a
commit
d7a0bfd47e
|
@ -76,12 +76,12 @@ class API
|
||||||
public function createMeeting(Room $room, Presentation $presentation = null)
|
public function createMeeting(Room $room, Presentation $presentation = null)
|
||||||
{
|
{
|
||||||
$bbb = $this->getServer();
|
$bbb = $this->getServer();
|
||||||
|
$meetingParams = $this->buildMeetingParams($room, $presentation);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$response = $bbb->createMeeting($this->buildMeetingParams($room, $presentation));
|
$response = $bbb->createMeeting($meetingParams);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw $e;
|
throw new \Exception('Can not process create request: ' . $bbb->getCreateMeetingUrl($meetingParams));
|
||||||
throw new \Exception('Can not process create request');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$response->success()) {
|
if (!$response->success()) {
|
||||||
|
@ -91,7 +91,7 @@ class API
|
||||||
return $response->getCreationTime();
|
return $response->getCreationTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildMeetingParams(Room $room, Presentation $presentation = null)
|
private function buildMeetingParams(Room $room, Presentation $presentation = null): CreateMeetingParameters
|
||||||
{
|
{
|
||||||
$createMeetingParams = new CreateMeetingParameters($room->uid, $room->name);
|
$createMeetingParams = new CreateMeetingParameters($room->uid, $room->name);
|
||||||
$createMeetingParams->setAttendeePassword($room->attendeePassword);
|
$createMeetingParams->setAttendeePassword($room->attendeePassword);
|
||||||
|
|
Loading…
Reference in New Issue