2015-10-05 15:24:37 +03:00
|
|
|
class Api::EventsController < Api::ApplicationController
|
2015-10-08 01:46:21 +03:00
|
|
|
include ::CurrentConferenceAssigning
|
2016-11-04 15:34:44 +02:00
|
|
|
include ::PublicApiExposing
|
2019-04-28 02:15:39 +03:00
|
|
|
before_action :require_current_conference!
|
2015-10-05 15:24:37 +03:00
|
|
|
|
2015-10-08 01:46:21 +03:00
|
|
|
def index
|
2016-08-27 17:11:20 +03:00
|
|
|
@events = current_conference.events.approved.joins(:proposition).includes(:participations)
|
2015-10-05 15:24:37 +03:00
|
|
|
end
|
2015-10-08 02:54:16 +03:00
|
|
|
|
|
|
|
def halfnarp_friendly
|
2019-10-04 14:37:36 +03:00
|
|
|
@events = current_conference.events.joins(:proposition).includes(:track, :event_type).where.not(propositions: {status: :rejected})
|
2024-09-13 23:09:16 +03:00
|
|
|
render json: @events, include: [:track, :event_type]
|
2015-10-08 02:54:16 +03:00
|
|
|
end
|
2015-10-05 15:24:37 +03:00
|
|
|
end
|