summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-01-18 11:18:44 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-01-18 11:18:44 +0000
commitd617c24f59f9cc1c068301ec755caa2de6cd6b73 (patch)
tree485ab910acbd4045a72172ce005aaac9b8a3eaf9 /lib
parent2af0b083c6791f50681a1afdae3d59e703c693b5 (diff)
parent1a3bcc76ea14dda52447a517122117942914ecac (diff)
downloadgitlab-ce-d617c24f59f9cc1c068301ec755caa2de6cd6b73.tar.gz
Merge branch '42129-fix-project-snippet-user-agent-detail' into 'master'
Fix the user-agent detail API endpoint for project snippets Closes #42129 See merge request gitlab-org/gitlab-ce!16521
Diffstat (limited to 'lib')
-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