summaryrefslogtreecommitdiff
path: root/lib/api/services.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-11-24 13:22:38 +0100
committerRémy Coutable <remy@rymai.me>2016-11-24 13:22:38 +0100
commit304163becba3610a99dfff644c13972a2f54ed3b (patch)
tree643be0d2dcddadf16d3996a28617203939cbb480 /lib/api/services.rb
parent4d2e7894efa36cc1b5de9432e25fcf22b6cf1d59 (diff)
downloadgitlab-ce-304163becba3610a99dfff644c13972a2f54ed3b.tar.gz
API: Use `#find_project` in API::Triggers and API::Services
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api/services.rb')
-rw-r--r--lib/api/services.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/services.rb b/lib/api/services.rb
index 4d23499aa39..bc427705777 100644
--- a/lib/api/services.rb
+++ b/lib/api/services.rb
@@ -65,7 +65,7 @@ module API
detail 'Added in GitLab 8.13'
end
post ':id/services/:service_slug/trigger' do
- project = Project.find_with_namespace(params[:id]) || Project.find_by(id: params[:id])
+ project = find_project(params[:id])
# This is not accurate, but done to prevent leakage of the project names
not_found!('Service') unless project