diff options
author | Nick Thomas <nick@gitlab.com> | 2018-04-17 17:51:06 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-04-17 17:51:06 +0300 |
commit | f13d5da2ae9417f9ad4ea1b37287e895da9b0cb7 (patch) | |
tree | 49a71236fba791fd3ea9bdd3716ef49894797600 /lib | |
parent | 73431ad0d1c429ec3b6f3457adbdc062e7ce69b4 (diff) | |
parent | 422aa5a62d704f5656d15dd79677d4393f0668a2 (diff) |
Merge branch '45363-optional-params-on-api-endpoint-produce-invalid-pagination-header-links' into 'master'
Fix URLs in the `Link` header for `GET /projects/:id/repository/contributors` when no value is passed for `order_by` or `sort`
Closes #45363
See merge request gitlab-org/gitlab-ce!18393
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/repositories.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb index 2396dc73f0e..bb3fa99af38 100644 --- a/lib/api/repositories.rb +++ b/lib/api/repositories.rb @@ -111,8 +111,8 @@ module API end params do use :pagination - optional :order_by, type: String, values: %w[email name commits], default: nil, desc: 'Return contributors ordered by `name` or `email` or `commits`' - optional :sort, type: String, values: %w[asc desc], default: nil, desc: 'Sort by asc (ascending) or desc (descending)' + optional :order_by, type: String, values: %w[email name commits], default: 'commits', desc: 'Return contributors ordered by `name` or `email` or `commits`' + optional :sort, type: String, values: %w[asc desc], default: 'asc', desc: 'Sort by asc (ascending) or desc (descending)' end get ':id/repository/contributors' do begin |