mirror of
https://github.com/openSUSE/osem.git
synced 2026-04-30 19:53:05 -04:00
18 lines
386 B
Ruby
18 lines
386 B
Ruby
module Api
|
|
module V1
|
|
class TracksController < Api::BaseController
|
|
respond_to :json
|
|
|
|
def index
|
|
if params[:conference_id].blank?
|
|
tracks = Track.all
|
|
else
|
|
tracks = Track.joins(:conference)
|
|
tracks = tracks.where(conferences: { guid: params[:conference_id] })
|
|
end
|
|
respond_with tracks
|
|
end
|
|
end
|
|
end
|
|
end
|