RRAdded response message.
This commit is contained in:
parent
3fcb3a0d64
commit
52e7aea4fa
@ -70,5 +70,13 @@ class DNSManager::Response
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
DNSManager.responses << RRDeleted
|
DNSManager.responses << RRDeleted
|
||||||
|
|
||||||
|
IPC::JSON.message RRAdded, 19 do
|
||||||
|
property domain : String
|
||||||
|
property rr : Storage::Zone::ResourceRecord
|
||||||
|
def initialize(@domain, @rr)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
DNSManager.responses << RRAdded
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -168,12 +168,14 @@ class DNSManager::Storage
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
puts "RRID before: #{rr.rrid}"
|
||||||
zone << rr
|
zone << rr
|
||||||
|
puts "RRID after: #{rr.rrid}"
|
||||||
|
|
||||||
# Update the zone.
|
# Update the zone.
|
||||||
zones_by_domain.update_or_create zone.domain, zone
|
zones_by_domain.update_or_create zone.domain, zone
|
||||||
|
|
||||||
Response::Success.new
|
Response::RRAdded.new zone.domain, rr
|
||||||
rescue e
|
rescue e
|
||||||
Baguette::Log.error "trying to add a resource record in domain #{domain}: #{e}"
|
Baguette::Log.error "trying to add a resource record in domain #{domain}: #{e}"
|
||||||
Response::Error.new "error while adding a resource record in domain #{domain}"
|
Response::Error.new "error while adding a resource record in domain #{domain}"
|
||||||
|
Loading…
Reference in New Issue
Block a user