5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 09:26:22 +00:00

feat: devolver las urls con protocolos

This commit is contained in:
f 2023-03-31 14:49:17 -03:00
parent 5dddc93736
commit 05f2fbc749

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
#