mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-14 04:04:03 +00: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
19 lines
557 B
Ruby
19 lines
557 B
Ruby
module Api
|
|
module V1
|
|
class RoomsController < 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
|
|
if @conference
|
|
respond_with @conference.venue ? @conference.venue.rooms : Room.none, callback: params[:callback]
|
|
else
|
|
respond_with Room.all, callback: params[:callback]
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|