Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmad Sherif <me@ahmadsherif.com>2016-05-12 23:48:09 +0300
committerAhmad Sherif <me@ahmadsherif.com>2016-05-12 23:48:09 +0300
commit0c22698bd4dbe7d0d3e4a6c8bc946ac6f5de1c12 (patch)
tree775771cbe8f3c16dedebe1f27acadd464c96099e /lib/api/labels.rb
parent74c69709dc19dbaf56c226b5a7955f229af10f4f (diff)
Add API endpoints for un/subscribing from/to a label
Closes #15638
Diffstat (limited to 'lib/api/labels.rb')
-rw-r--r--lib/api/labels.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/labels.rb b/lib/api/labels.rb
index 4af6bef0fa7..c806829d69e 100644
--- a/lib/api/labels.rb
+++ b/lib/api/labels.rb
@@ -11,7 +11,7 @@ module API
# Example Request:
# GET /projects/:id/labels
get ':id/labels' do
- present user_project.labels, with: Entities::Label
+ present user_project.labels, with: Entities::Label, current_user: current_user
end
# Creates a new label
@@ -36,7 +36,7 @@ module API
label = user_project.labels.create(attrs)
if label.valid?
- present label, with: Entities::Label
+ present label, with: Entities::Label, current_user: current_user
else
render_validation_error!(label)
end
@@ -90,7 +90,7 @@ module API
attrs[:name] = attrs.delete(:new_name) if attrs.key?(:new_name)
if label.update(attrs)
- present label, with: Entities::Label
+ present label, with: Entities::Label, current_user: current_user
else
render_validation_error!(label)
end