mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-14 04:04:03 +00:00
17 lines
365 B
Ruby
17 lines
365 B
Ruby
module Api
|
|
module V1
|
|
class 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
|
|
end
|
|
end
|