summaryrefslogtreecommitdiff
path: root/lib/api/project_snippets.rb
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-01-17 14:30:07 +0000
committerNick Thomas <nick@gitlab.com>2018-01-17 14:30:07 +0000
commit1a3bcc76ea14dda52447a517122117942914ecac (patch)
tree25ab2c54087e2ee098156f99462460bed39c35de /lib/api/project_snippets.rb
parentf17d7a4beef61d0156865f1a9070fb53c8f05c99 (diff)
downloadgitlab-ce-1a3bcc76ea14dda52447a517122117942914ecac.tar.gz
Fix the user-agent detail API endpoint for project snippets
Diffstat (limited to 'lib/api/project_snippets.rb')
-rw-r--r--lib/api/project_snippets.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/project_snippets.rb b/lib/api/project_snippets.rb
index 5bed58c2d63..39c03c40bab 100644
--- a/lib/api/project_snippets.rb
+++ b/lib/api/project_snippets.rb
@@ -143,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