forked from External/greenlight
add room post
This commit is contained in:
@ -22,7 +22,7 @@ class RoomsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# GET/POST /r/:room_uid
|
||||
# GET /r/:room_uid
|
||||
def show
|
||||
opts = default_meeting_options
|
||||
|
||||
@ -34,13 +34,8 @@ class RoomsController < ApplicationController
|
||||
redirect_to @room.join_path(current_user, opts)
|
||||
end
|
||||
else
|
||||
# If you're unauthenticated, you must enter a name to join the meeting.
|
||||
if params[:join_name]
|
||||
redirect_to @room.join_path(params[:join_name], opts)
|
||||
else
|
||||
# Render the join page so they can supply their name.
|
||||
render :join
|
||||
end
|
||||
# Render the join page so they can supply their name.
|
||||
render :join
|
||||
end
|
||||
else
|
||||
# If the meeting isn't running and you don't own the room, go to the waiting page.
|
||||
@ -50,6 +45,16 @@ class RoomsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# POST /r/:room_uid
|
||||
def join
|
||||
opts = default_meeting_options
|
||||
|
||||
# If you're unauthenticated, you must enter a name to join the meeting.
|
||||
if params[:join_name]
|
||||
redirect_to @room.join_path(params[:join_name], opts)
|
||||
end
|
||||
end
|
||||
|
||||
# DELETE /r/:room_uid
|
||||
def destroy
|
||||
@room.destroy
|
||||
|
Reference in New Issue
Block a user