Merge remote-tracking branch 'origin/pr/28'
This commit is contained in:
commit
e8a575bd50
|
@ -1,5 +1,6 @@
|
|||
class Api::EventTypesController < Api::ApplicationController
|
||||
include ::CurrentConferenceAssigning
|
||||
include ::PublicApiExposing
|
||||
before_filter :require_current_conference!
|
||||
|
||||
def index
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
class Api::EventsController < Api::ApplicationController
|
||||
include ::CurrentConferenceAssigning
|
||||
include ::PublicApiExposing
|
||||
before_filter :require_current_conference!
|
||||
|
||||
def index
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
class Api::HallsController < Api::ApplicationController
|
||||
include ::CurrentConferenceAssigning
|
||||
include ::PublicApiExposing
|
||||
before_filter :require_current_conference!
|
||||
|
||||
def index
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
class Api::SlotsController < Api::ApplicationController
|
||||
include ::CurrentConferenceAssigning
|
||||
include ::PublicApiExposing
|
||||
before_filter :require_current_conference!
|
||||
|
||||
def index
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
class Api::SpeakersController < Api::ApplicationController
|
||||
include ::CurrentConferenceAssigning
|
||||
include ::PublicApiExposing
|
||||
before_filter :require_current_conference!
|
||||
|
||||
def index
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
class Api::TracksController < Api::ApplicationController
|
||||
include ::CurrentConferenceAssigning
|
||||
include ::PublicApiExposing
|
||||
before_filter :require_current_conference!
|
||||
|
||||
def index
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
require 'active_support/concern'
|
||||
|
||||
module PublicApiExposing
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
def set_access_control_headers
|
||||
if request.format.json?
|
||||
response.headers['Access-Control-Allow-Origin'] = '*'
|
||||
end
|
||||
end
|
||||
|
||||
included do
|
||||
before_action :set_access_control_headers
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue