mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-24 02:31:50 +00:00
Merge branch 'issue-13159' into issue-18074
This commit is contained in:
commit
cfc016c1c6
1 changed files with 10 additions and 1 deletions
|
@ -14,7 +14,7 @@ module Api
|
|||
|
||||
# Lista de nombres de dominios a emitir certificados
|
||||
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
|
||||
|
||||
private
|
||||
|
@ -37,6 +37,15 @@ module Api
|
|||
name.end_with?(SUBDOMAIN) && name.split('.').count == (PARTS + 1)
|
||||
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
|
||||
#
|
||||
# @return [Array<String>]
|
||||
|
|
Loading…
Reference in a new issue