mirror of
https://github.com/openSUSE/osem.git
synced 2026-01-19 19:41:31 -05:00
20 lines
500 B
Ruby
20 lines
500 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Api
|
|
module V1
|
|
class TracksController < Api::BaseController
|
|
load_resource :conference, find_by: :short_title
|
|
respond_to :json
|
|
|
|
# Disable forgery protection for any json requests. This is required for jsonp support
|
|
skip_before_action :verify_authenticity_token
|
|
|
|
def index
|
|
tracks = @conference ? @conference.program.tracks : Track.all
|
|
|
|
respond_with tracks, callback: params[:callback]
|
|
end
|
|
end
|
|
end
|
|
end
|