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-19 20:02:15 +0100
commit2370ff85fe6fec3ca94d073c7460edf2c6123b59 (patch)
treef7a1b4496ec1a59e6a5e9ec876880c094cb6a047 /lib/api/search.rb
parentcd4ddee0d646c4be6e4eb657179afb0642fc8fa8 (diff)
downloadgitlab-ce-2370ff85fe6fec3ca94d073c7460edf2c6123b59.tar.gz
Optional '/-/' delimiter for search API
'/-/' 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