mirror of
https://github.com/cmur2/dyndnsd.git
synced 2025-07-21 21:11:17 +02:00
daemon: break extracting myip down into smaller parts
This commit is contained in:
@ -34,9 +34,8 @@ module Dyndnsd
|
||||
end
|
||||
end
|
||||
|
||||
def get_success_body(states, ip)
|
||||
ips = ip.is_a?(Array) ? ip.join(' ') : ip
|
||||
states.map { |state| "#{state} #{ips}" }.join("\n")
|
||||
def get_success_body(changes, myips)
|
||||
changes.map { |change| "#{change} #{myips.join(' ')}" }.join("\n")
|
||||
end
|
||||
|
||||
def get_error_response_map
|
||||
|
@ -34,10 +34,8 @@ module Dyndnsd
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def get_success_response(states, ip)
|
||||
ips = ip.is_a?(Array) ? ip.join(' ') : ip
|
||||
states.map { |state| state == :good ? "Changed to #{ips}" : "No change needed for #{ips}" }.join("\n")
|
||||
def get_success_body(changes, myips)
|
||||
changes.map { |change| change == :good ? "Changed to #{myips.join(' ')}" : "No change needed for #{myips.join(' ')}" }.join("\n")
|
||||
end
|
||||
|
||||
def get_error_response_map
|
||||
|
Reference in New Issue
Block a user