Explorar o código

Update pro meeting page URL

Vijayakrishnan %!s(int64=5) %!d(string=hai) anos
pai
achega
fdb9518d9e

+ 1 - 2
app/Http/Controllers/ProController.php

@@ -28,7 +28,7 @@ class ProController extends Controller
         return view('pro.show', compact('pro'));
     }
 
-    public function meeting(Request $request, $meetingID, $participantID) {
+    public function meeting(Request $request, $meetingID) {
         $meeting = Meeting::where('uid', $meetingID)->first();
         if(!$meeting) {
             return abort(404, "Meeting no longer active");
@@ -39,7 +39,6 @@ class ProController extends Controller
         }
         return view('meeting', [
             'meetingID' => $meetingID,
-            'participantID'=> $participantID,
             'participants' => $participants,
             'guest' => false
         ]);

+ 1 - 3
resources/views/layouts/pro.blade.php

@@ -128,7 +128,6 @@
 
                     $('#incomingCallModal')
                         .data('meetingUid', message.meetingUid)
-                        .data('meetingParticipantUid', message.meetingParticipantUid)
                         .modal('show');
 
                 });
@@ -146,8 +145,7 @@
         function joinCall() {
             var modal = $('#incomingCallModal');
             window.location.href = '/pro/meeting/' +
-                modal.data('meetingUid') + '/' +
-                modal.data('meetingParticipantUid');
+                modal.data('meetingUid');
         }
 
         function disconnect() {

+ 1 - 1
resources/views/meeting.blade.php

@@ -94,7 +94,7 @@
             delimiters: ['@{{', '}}'],
             data: {
                 meetingID: '<?= $meetingID ?>',
-                participantID: '<?= $participantID ?>',
+                participantID: '<?= $guest ? $participantID : '' ?>',
                 socket: null,
                 stompClient: null,
                 time: 0,

+ 1 - 1
routes/web.php

@@ -36,7 +36,7 @@ Route::middleware('ensureValidSession')->group(function(){
     Route::get("/pros/create", 'ProController@create')->name('pro-create');
     Route::get("/pros/show/{uid}", 'ProController@show')->name('pro-show');
 
-    Route::get('/pro/meeting/{meetingID}/{participantID}', 'ProController@meeting');
+    Route::get('/pro/meeting/{meetingID}', 'ProController@meeting');
 
     Route::get('/pro/logout', 'AppSessionController@processProLogOut')->name('pro-logout');
 });