Adding api/v1/conferences/x/conferences
* A little weird, but needed by suseconferenceclient
This commit is contained in:
parent
2553bd4e03
commit
740a604c01
2 changed files with 7 additions and 1 deletions
|
|
@ -2,6 +2,11 @@ class Api::V1::ConferencesController < Api::BaseController
|
||||||
respond_to :json
|
respond_to :json
|
||||||
|
|
||||||
def index
|
def index
|
||||||
render :json => Conference.all, :serializer => ConferencesArraySerializer
|
if params[:conference_id].blank?
|
||||||
|
conferences = Conference.all
|
||||||
|
else
|
||||||
|
conferences = Conference.find_all_by_guid(params[:conference_id])
|
||||||
|
end
|
||||||
|
render :json => conferences, :serializer => ConferencesArraySerializer
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ Osem::Application.routes.draw do
|
||||||
namespace :api, defaults: {format: 'json'} do
|
namespace :api, defaults: {format: 'json'} do
|
||||||
namespace :v1 do
|
namespace :v1 do
|
||||||
resources :conferences, :only => :index do
|
resources :conferences, :only => :index do
|
||||||
|
resources :conferences, :only => :index
|
||||||
resources :rooms, :only => :index
|
resources :rooms, :only => :index
|
||||||
resources :tracks, :only => :index
|
resources :tracks, :only => :index
|
||||||
resources :speakers, :only => :index
|
resources :speakers, :only => :index
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue