mirror of
https://github.com/openSUSE/osem.git
synced 2026-02-07 20:51:28 -05:00
Due to my testing, I incorrectly removed the forgery protection skip action from the controllers in the api. This fixes that and allows jsonp calls to work correctly
20 lines
568 B
Ruby
20 lines
568 B
Ruby
module Api
|
|
module V1
|
|
class ConferencesController < Api::BaseController
|
|
load_resource 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
|
|
render json: @conferences, serializer: ConferencesArraySerializer, callback: params['callback']
|
|
end
|
|
|
|
def show
|
|
render json: [@conference], serializer: ConferencesArraySerializer, callback: params['callback']
|
|
end
|
|
end
|
|
end
|
|
end
|