summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTravis Miller <travis@travismiller.com>2017-08-21 18:58:50 -0500
committerTravis Miller <travis@travismiller.com>2017-10-22 08:04:42 -0500
commitbcccf6c1619ecd56bbcc515c4a8f057ba34d0ab9 (patch)
treeff83faa43e2cfba59ba9d10a8216659d4f7af3fb /lib
parentaca58784bd51679a3406a1d5bf9562b1ae16def7 (diff)
downloadgitlab-ce-bcccf6c1619ecd56bbcc515c4a8f057ba34d0ab9.tar.gz
Add pages domains API entities
Diffstat (limited to 'lib')
-rw-r--r--lib/api/entities.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 5f0bad14839..efe874b2e6b 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -1043,5 +1043,22 @@ module API
expose :key
expose :value
end
+
+ class PagesDomainCertificate < Grape::Entity
+ expose :subject
+ expose :expired?, as: :expired
+ expose :certificate
+ expose :certificate_text
+ end
+
+ class PagesDomain < Grape::Entity
+ expose :domain
+ expose :url
+ expose :certificate,
+ if: ->(pages_domain, _) { pages_domain.certificate? },
+ using: PagesDomainCertificate do |pages_domain|
+ pages_domain
+ end
+ end
end
end