clarion/app/controllers/api/events_controller.rb

15 lines
531 B
Ruby
Raw Normal View History

class Api::EventsController < Api::ApplicationController
include ::CurrentConferenceAssigning
include ::PublicApiExposing
2019-04-28 02:15:39 +03:00
before_action :require_current_conference!
def index
2016-08-27 17:11:20 +03:00
@events = current_conference.events.approved.joins(:proposition).includes(:participations)
end
def halfnarp_friendly
@events = current_conference.events.joins(:proposition).includes(:track, :event_type).where.not(propositions: {status: :rejected})
2024-09-13 22:58:10 +03:00
render json: JSON.dump(@events.to_json(include: [:track, :event_type]))
end
end