Add freshness headers to API
This commit is contained in:
parent
1018b93b11
commit
89dd1890fd
|
@ -3,5 +3,6 @@ class Api::ConferencesController < Api::ApplicationController
|
|||
|
||||
def index
|
||||
@conferences = Conference.all
|
||||
fresh_when @conferences
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,5 +5,6 @@ class Api::EventTypesController < Api::ApplicationController
|
|||
|
||||
def index
|
||||
@event_types = current_conference.event_types.includes(:translations)
|
||||
fresh_when @event_types
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,5 +5,6 @@ class Api::HallsController < Api::ApplicationController
|
|||
|
||||
def index
|
||||
@halls = current_conference.halls
|
||||
fresh_when @halls
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,5 +5,7 @@ class Api::SlotsController < Api::ApplicationController
|
|||
|
||||
def index
|
||||
@slots = current_conference.slots
|
||||
|
||||
fresh_when @slots
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,5 +5,6 @@ class Api::SpeakersController < Api::ApplicationController
|
|||
|
||||
def index
|
||||
@speakers = PersonalProfile.joins(user: {participations: {event: :proposition}}).where(events: {id: current_conference.approved_events.pluck(:id)}, conference: current_conference).distinct
|
||||
fresh_when @speakers
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,5 +5,6 @@ class Api::TracksController < Api::ApplicationController
|
|||
|
||||
def index
|
||||
@tracks = current_conference.tracks.includes(:translations)
|
||||
fresh_when @tracks
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue