mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Fix API endpoints conferences/id/rooms/ & tracks/ issue #874
This commit is contained in:
parent
cb9cf0359b
commit
55cfc8ff60
2 changed files with 2 additions and 3 deletions
|
|
@ -8,8 +8,7 @@ module Api
|
|||
if params[:conference_id].blank?
|
||||
rooms = Room.all
|
||||
else
|
||||
conference = Conference.find_by_guid(params[:conference_id])
|
||||
rooms = conference.venue.rooms if conference.venue
|
||||
@conference.venue ? (rooms = @conference.venue.rooms) : (rooms = [])
|
||||
end
|
||||
respond_with rooms
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ module Api
|
|||
respond_to :json
|
||||
|
||||
def index
|
||||
@conference ? (tracks = @conference.tracks) : (tracks = Track.all)
|
||||
@conference ? (tracks = @conference.program.tracks) : (tracks = Track.all)
|
||||
|
||||
respond_with tracks
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue