mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-17 13:44:09 +00:00
json API for suseconferenceclient
This commit is contained in:
parent
d648ab7cb5
commit
d95d8f234b
12 changed files with 159 additions and 8 deletions
13
app/controllers/api/v1/rooms_controller.rb
Normal file
13
app/controllers/api/v1/rooms_controller.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
class Api::V1::RoomsController < Api::BaseController
|
||||
respond_to :json
|
||||
|
||||
def index
|
||||
if params[:conference_id].blank?
|
||||
rooms = Room.all
|
||||
else
|
||||
conference = Conference.find_by_guid(params[:conference_id])
|
||||
rooms = conference.rooms
|
||||
end
|
||||
respond_with rooms
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue