mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 09:16:22 +00:00
feat: devolver las urls con protocolos
This commit is contained in:
parent
5dddc93736
commit
05f2fbc749
1 changed files with 13 additions and 1 deletions
|
@ -80,6 +80,12 @@ class DeployDistributedPress < Deploy
|
|||
|
||||
# Devuelve las URLs de todos los protocolos
|
||||
def urls
|
||||
protocol_urls + gateway_urls
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def gateway_urls
|
||||
remote_info.dig(:distributed_press, :links).values.map do |protocol|
|
||||
[ protocol[:link], protocol[:gateway] ]
|
||||
end.flatten.compact.select do |link|
|
||||
|
@ -87,7 +93,13 @@ class DeployDistributedPress < Deploy
|
|||
end
|
||||
end
|
||||
|
||||
private
|
||||
def protocol_urls
|
||||
remote_info.dig(:distributed_press, :protocols).select do |_, enabled|
|
||||
enabled
|
||||
end.map do |protocol, _|
|
||||
"#{protocol}://#{site.hostname}"
|
||||
end
|
||||
end
|
||||
|
||||
# El cliente de la API
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue