[refs #736] add to api build lists of the project

This commit is contained in:
Alexander Machehin 2012-11-29 23:52:15 +06:00
parent ec2754e932
commit 364e5d9b67
2 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,7 @@ class Api::V1::BuildListsController < Api::V1::BaseController
load_and_authorize_resource :build_list, :only => [:show, :create, :cancel, :publish, :reject_publish]
def index
filter = BuildList::Filter.new(nil, current_user, params[:filter] || {})
filter = BuildList::Filter.new(@project, current_user, params[:filter] || {})
@build_lists = filter.find.scoped(:include => [:save_to_platform, :project, :user, :arch])
@build_lists = @build_lists.recent.paginate(paginate_params)
end

View File

@ -54,6 +54,7 @@ Rosa::Application.routes.draw do
delete :remove_member
put :update_member
}
resources :build_lists, :only => :index
end
resources :users, :only => [:show]
get 'user' => 'users#show_current_user'