summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2016-11-16 13:57:42 +0000
committerSean McGivern <sean@mcgivern.me.uk>2016-11-16 13:57:42 +0000
commit1263708d81dcb978b44139a2965d384dff310fcc (patch)
tree6075639f5c4e1cbf1f92d6054e03d955cd0b5651 /lib/api
parented70f29ffd1e58c43606134e4940c8cd57020718 (diff)
parent8966c6e33daec5480f19149d2a6102107833afe0 (diff)
downloadgitlab-ce-1263708d81dcb978b44139a2965d384dff310fcc.tar.gz
Merge branch 'fix_labels_api_adding_missing_parameter' into 'master'
fix labels API adding missing parameter (current_user) See merge request !7458
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/entities.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 8f1aaaaaaa0..6e370e961c4 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -437,7 +437,18 @@ module API
end
class Label < LabelBasic
- expose :open_issues_count, :closed_issues_count, :open_merge_requests_count
+ expose :open_issues_count do |label, options|
+ label.open_issues_count(options[:current_user])
+ end
+
+ expose :closed_issues_count do |label, options|
+ label.closed_issues_count(options[:current_user])
+ end
+
+ expose :open_merge_requests_count do |label, options|
+ label.open_merge_requests_count(options[:current_user])
+ end
+
expose :priority do |label, options|
label.priority(options[:project])
end