5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-05-02 20:37:04 +00:00

feat: devolver las urls con protocolos

This commit is contained in:
f 2023-03-31 14:49:17 -03:00
parent a56acfd6da
commit ab126038af

View file

@ -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
#