5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2025-02-24 02:21:51 +00:00

Merge branch 'issue-13159' into issue-18074

This commit is contained in:
f 2024-12-28 16:10:47 -03:00
commit cfc016c1c6
No known key found for this signature in database

View file

@ -14,7 +14,7 @@ module Api
# Lista de nombres de dominios a emitir certificados # Lista de nombres de dominios a emitir certificados
def index def index
render json: alternative_names.concat(api_names).concat(www_names) render json: sites_names.concat(alternative_names).concat(api_names).concat(www_names)
end end
private private
@ -37,6 +37,15 @@ module Api
name.end_with?(SUBDOMAIN) && name.split('.').count == (PARTS + 1) name.end_with?(SUBDOMAIN) && name.split('.').count == (PARTS + 1)
end end
# Nombres de los sitios
def sites_names
Site.all.order(:name).pluck(:name).map do |name|
canonicalize name
end.reject do |name|
subdomain? name
end
end
# Dominios alternativos # Dominios alternativos
# #
# @return [Array<String>] # @return [Array<String>]