diff options
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/helpers.rb | 11 | ||||
-rw-r--r-- | lib/api/projects.rb | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 6134ad2bfc7..643d9a05009 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -379,7 +379,16 @@ module API finder_params[:non_public] = true if params[:membership].present? finder_params[:starred] = true if params[:starred].present? finder_params[:visibility_level] = Gitlab::VisibilityLevel.level_value(params[:visibility]) if params[:visibility] - finder_params[:archived] = params[:archived] + + unless params[:archived].nil? + finder_params[:archived] = + if params[:archived] + 'only' + else + false + end + end + finder_params[:search] = params[:search] if params[:search] finder_params[:user] = params.delete(:user) if params[:user] finder_params[:custom_attributes] = params[:custom_attributes] if params[:custom_attributes] diff --git a/lib/api/projects.rb b/lib/api/projects.rb index e90892a90f7..24806dd72b6 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -55,7 +55,7 @@ module API end params :filter_params do - optional :archived, type: Boolean, default: false, desc: 'Limit by archived status' + optional :archived, type: Boolean, default: nil, desc: 'Limit by archived status' optional :visibility, type: String, values: Gitlab::VisibilityLevel.string_values, desc: 'Limit by visibility' optional :search, type: String, desc: 'Return list of projects matching the search criteria' |