From 364e5d9b676a4f718e1ac736c3d550c1b61d2ebc Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Thu, 29 Nov 2012 23:52:15 +0600 Subject: [PATCH] [refs #736] add to api build lists of the project --- app/controllers/api/v1/build_lists_controller.rb | 2 +- config/routes.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/v1/build_lists_controller.rb b/app/controllers/api/v1/build_lists_controller.rb index b41459394..91e8ce058 100644 --- a/app/controllers/api/v1/build_lists_controller.rb +++ b/app/controllers/api/v1/build_lists_controller.rb @@ -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 diff --git a/config/routes.rb b/config/routes.rb index b57307f1b..a3a65c2a2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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'