From f8d261f149cfadb8bf0b9599beaa2e17d6f73e0d Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sat, 27 Aug 2016 17:11:20 +0300 Subject: [PATCH] Expose part of the event API again --- app/controllers/api/events_controller.rb | 2 +- config/routes.rb | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) 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