Specific message for domain deletion.
This commit is contained in:
parent
63da767caa
commit
4fe6bd7c9e
@ -1,5 +1,12 @@
|
||||
|
||||
class DNSManager::Response
|
||||
IPC::JSON.message DomainDeleted, 9 do
|
||||
property domain : String
|
||||
def initialize(@domain)
|
||||
end
|
||||
end
|
||||
DNSManager.responses << DomainDeleted
|
||||
|
||||
IPC::JSON.message InvalidZone, 10 do
|
||||
# For now, Error is just an alias on String.
|
||||
property errors : Array(Storage::Zone::Error)
|
||||
|
@ -276,7 +276,7 @@ class DNSManager::Storage
|
||||
# Remove the related zone.
|
||||
zones_by_domain.delete domain
|
||||
|
||||
Response::Success.new
|
||||
Response::DomainDeleted.new domain
|
||||
rescue e
|
||||
Baguette::Log.error "trying to delete a domain #{domain}: #{e}"
|
||||
Response::Error.new "error while deleting the domain #{domain}"
|
||||
|
Loading…
Reference in New Issue
Block a user