diff options
author | Travis Miller <travis@travismiller.com> | 2017-11-13 16:05:44 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-11-13 16:05:44 +0000 |
commit | 1162d89ac49553c579ec4d049e74206893ff6302 (patch) | |
tree | 29db898298f93c35c86788bf36ea782b21dac1a9 /lib/api/pages_domains.rb | |
parent | e897d8b7f7755107ab632dc5b392c1dc246eb2c8 (diff) | |
download | gitlab-ce-1162d89ac49553c579ec4d049e74206893ff6302.tar.gz |
Add administrative endpoint to list all pages domains
Diffstat (limited to 'lib/api/pages_domains.rb')
-rw-r--r-- | lib/api/pages_domains.rb | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/api/pages_domains.rb b/lib/api/pages_domains.rb index 259f3f34068..d7b613a717e 100644 --- a/lib/api/pages_domains.rb +++ b/lib/api/pages_domains.rb @@ -4,7 +4,6 @@ module API before do authenticate! - require_pages_enabled! end after_validation do @@ -29,10 +28,31 @@ module API end end + resource :pages do + before do + require_pages_config_enabled! + authenticated_with_full_private_access! + end + + desc "Get all pages domains" do + success Entities::PagesDomainBasic + end + params do + use :pagination + end + get "domains" do + present paginate(PagesDomain.all), with: Entities::PagesDomainBasic + end + end + params do requires :id, type: String, desc: 'The ID of a project' end resource :projects, requirements: { id: %r{[^/]+} } do + before do + require_pages_enabled! + end + desc 'Get all pages domains' do success Entities::PagesDomain end |