mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
18 lines
446 B
Ruby
18 lines
446 B
Ruby
module Api
|
|
module V1
|
|
class RoomsController < Api::BaseController
|
|
load_resource :conference, find_by: :short_title
|
|
respond_to :json
|
|
|
|
def index
|
|
if params[:conference_id].blank?
|
|
rooms = Room.all
|
|
else
|
|
conference = Conference.find_by_guid(params[:conference_id])
|
|
rooms = conference.venue.rooms if conference.venue
|
|
end
|
|
respond_with rooms
|
|
end
|
|
end
|
|
end
|
|
end
|