diff --git a/app/controllers/api/events_controller.rb b/app/controllers/api/events_controller.rb index ca6ec1c..8c9bd8a 100644 --- a/app/controllers/api/events_controller.rb +++ b/app/controllers/api/events_controller.rb @@ -3,7 +3,7 @@ class Api::EventsController < Api::ApplicationController before_filter :require_current_conference! def index - @events = current_conference.events.includes(:participations) + @events = current_conference.events.approved.joins(:proposition).includes(:participations) end def halfnarp_friendly diff --git a/config/routes.rb b/config/routes.rb index bb41869..6b94dbe 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -15,12 +15,12 @@ Rails.application.routes.draw do namespace :api do resources :conferences, only: [] do - # resources :events, only: :index do - # collection do - # get :halfnarp_friendly - # end - # end - # resources :speakers, only: :index + resources :events, only: :index do + # collection do + # get :halfnarp_friendly + # end + end + resources :speakers, only: :index resources :tracks, only: :index resources :event_types, only: :index resources :halls, only: :index