summaryrefslogtreecommitdiff
path: root/lib/api/search.rb
diff options
context:
space:
mode:
authorJan Provaznik <jprovaznik@gitlab.com>2018-03-14 16:49:21 +0100
committerJan Provaznik <jprovaznik@gitlab.com>2018-03-14 17:15:53 +0100
commit910f76e1aced1d402051db99688c2009caa25c21 (patch)
treedea3009d9c5d87e38b4672ac32b0639657cf2fda /lib/api/search.rb
parentfeb95ce3412ae3ab8b2c990b8ddf64d8d8945670 (diff)
downloadgitlab-ce-api-delimiter.tar.gz
Optional '/-/' delimiter for search APIapi-delimiter
'/-/' delimiter is used only in UI, in API we don't use it for other endpoints. To align search endpoints with the rest of API endpoints, this patch makes '/-/' optional for existing endpoints (to keep backward compatibility). Documentation is updated to prefer paths without '/-/'.
Diffstat (limited to 'lib/api/search.rb')
-rw-r--r--lib/api/search.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/search.rb b/lib/api/search.rb
index 3556ad98c52..5d9ec617cb7 100644
--- a/lib/api/search.rb
+++ b/lib/api/search.rb
@@ -84,7 +84,7 @@ module API
values: %w(projects issues merge_requests milestones)
use :pagination
end
- get ':id/-/search' do
+ get ':id/(-/)search' do
present search(group_id: user_group.id), with: entity
end
end
@@ -103,7 +103,7 @@ module API
values: %w(issues merge_requests milestones notes wiki_blobs commits blobs)
use :pagination
end
- get ':id/-/search' do
+ get ':id/(-/)search' do
present search(project_id: user_project.id), with: entity
end
end