summaryrefslogtreecommitdiff
path: root/lib/api/project_snippets.rb
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2018-01-25 09:47:36 +0000
committerTiago Botelho <tiagonbotelho@hotmail.com>2018-01-25 10:00:17 +0000
commit4903ff93971d28723ed9d81f7dae2ad2a1d5586a (patch)
tree8f6f5cbc302f0820c1ffd0c85528388fd33bb8d7 /lib/api/project_snippets.rb
parent3805cd7ac5e1c9b286bfba667ef45972eab4d084 (diff)
parent944c1eb684fe979339262ba6e9f7bf9e1b77fc81 (diff)
downloadgitlab-ce-13931-custom-emoji-implementation.tar.gz
Merge branch 'master' into 13931-custom-emoji-implementation13931-custom-emoji-implementation
Conflicts: app/assets/javascripts/dispatcher.js app/assets/javascripts/pages/projects/shared/project_avatar.js
Diffstat (limited to 'lib/api/project_snippets.rb')
-rw-r--r--lib/api/project_snippets.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/project_snippets.rb b/lib/api/project_snippets.rb
index 2ccda1c1aa1..39c03c40bab 100644
--- a/lib/api/project_snippets.rb
+++ b/lib/api/project_snippets.rb
@@ -13,6 +13,7 @@ module API
if errors[:project_access].any?
error!(errors[:project_access], 422)
end
+
not_found!
end
@@ -142,7 +143,7 @@ module API
get ":id/snippets/:snippet_id/user_agent_detail" do
authenticated_as_admin!
- snippet = Snippet.find_by!(id: params[:id])
+ snippet = Snippet.find_by!(id: params[:snippet_id], project_id: params[:id])
return not_found!('UserAgentDetail') unless snippet.user_agent_detail