mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
more style fixes
This commit is contained in:
parent
1c1391c69e
commit
e06e0a5ca3
8 changed files with 134 additions and 114 deletions
|
|
@ -1,3 +1,5 @@
|
|||
class Api::BaseController < ActionController::Base
|
||||
protect_from_forgery
|
||||
module Api
|
||||
class BaseController < ActionController::Base
|
||||
protect_from_forgery
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,12 +1,16 @@
|
|||
class Api::V1::ConferencesController < Api::BaseController
|
||||
respond_to :json
|
||||
module Api
|
||||
module V1
|
||||
class ConferencesController < Api::BaseController
|
||||
respond_to :json
|
||||
|
||||
def index
|
||||
if params[:conference_id].blank?
|
||||
conferences = Conference.all
|
||||
else
|
||||
conferences = Conference.find_all_by_guid(params[:conference_id])
|
||||
def index
|
||||
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
|
||||
render json: conferences, serializer: ConferencesArraySerializer
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,13 +1,17 @@
|
|||
class Api::V1::RoomsController < Api::BaseController
|
||||
respond_to :json
|
||||
module Api
|
||||
module V1
|
||||
class RoomsController < Api::BaseController
|
||||
respond_to :json
|
||||
|
||||
def index
|
||||
if params[:conference_id].blank?
|
||||
rooms = Room.all
|
||||
else
|
||||
conference = Conference.find_by_guid(params[:conference_id])
|
||||
rooms = conference.rooms
|
||||
def index
|
||||
if params[:conference_id].blank?
|
||||
rooms = Room.all
|
||||
else
|
||||
conference = Conference.find_by_guid(params[:conference_id])
|
||||
rooms = conference.rooms
|
||||
end
|
||||
respond_with rooms
|
||||
end
|
||||
end
|
||||
respond_with rooms
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,13 +1,17 @@
|
|||
class Api::V1::TracksController < Api::BaseController
|
||||
respond_to :json
|
||||
module Api
|
||||
module V1
|
||||
class TracksController < Api::BaseController
|
||||
respond_to :json
|
||||
|
||||
def index
|
||||
if params[:conference_id].blank?
|
||||
tracks = Track.all
|
||||
else
|
||||
tracks = Track.joins(:conference)
|
||||
tracks = tracks.where("conferences.guid" => params[:conference_id])
|
||||
def index
|
||||
if params[:conference_id].blank?
|
||||
tracks = Track.all
|
||||
else
|
||||
tracks = Track.joins(:conference)
|
||||
tracks = tracks.where("conferences.guid" => params[:conference_id])
|
||||
end
|
||||
respond_with tracks
|
||||
end
|
||||
end
|
||||
respond_with tracks
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue