summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorAlexander Randa <randa.alex@gmail.com>2017-03-27 13:43:21 +0000
committerAlexander Randa <randa.alex@gmail.com>2017-03-28 17:43:55 +0300
commitc4be3460c202cf8c33429ddca8f0f8383907ac60 (patch)
tree774855670f155efd39aee680c281445e59f51d00 /lib/api
parentf74e9245cb18582caa79abd4b7c0b942b9dae851 (diff)
downloadgitlab-ce-c4be3460c202cf8c33429ddca8f0f8383907ac60.tar.gz
Fix API group/issues default state filter
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/issues.rb4
-rw-r--r--lib/api/v3/issues.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/issues.rb b/lib/api/issues.rb
index fd2674910d2..4dce5dd130a 100644
--- a/lib/api/issues.rb
+++ b/lib/api/issues.rb
@@ -63,14 +63,14 @@ module API
success Entities::IssueBasic
end
params do
- optional :state, type: String, values: %w[opened closed all], default: 'opened',
+ optional :state, type: String, values: %w[opened closed all], default: 'all',
desc: 'Return opened, closed, or all issues'
use :issues_params
end
get ":id/issues" do
group = find_group!(params[:id])
- issues = find_issues(group_id: group.id, state: params[:state] || 'opened')
+ issues = find_issues(group_id: group.id)
present paginate(issues), with: Entities::IssueBasic, current_user: current_user
end
diff --git a/lib/api/v3/issues.rb b/lib/api/v3/issues.rb
index 54c6a8060b8..715083fc4f8 100644
--- a/lib/api/v3/issues.rb
+++ b/lib/api/v3/issues.rb
@@ -73,14 +73,14 @@ module API
success ::API::Entities::Issue
end
params do
- optional :state, type: String, values: %w[opened closed all], default: 'opened',
+ optional :state, type: String, values: %w[opened closed all], default: 'all',
desc: 'Return opened, closed, or all issues'
use :issues_params
end
get ":id/issues" do
group = find_group!(params[:id])
- issues = find_issues(group_id: group.id, state: params[:state] || 'opened', match_all_labels: true)
+ issues = find_issues(group_id: group.id, match_all_labels: true)
present paginate(issues), with: ::API::Entities::Issue, current_user: current_user
end