root/lib/cyborghood-mapmaker/interface/_zone/0_base.rb @ 685a6991
90197e7b | Marc Dequènes (Duck) | bot.services.dnssec.flush_cache
|
|
zone = bot.services.zone(node_name)
|
|||
4761cd13 | Marc Dequènes (Duck) | ||
on_request do |request|
|
|||
90197e7b | Marc Dequènes (Duck) | request.reply.results = zone.info
|
|
4761cd13 | Marc Dequènes (Duck) | end
|
|
66a02240 | Marc Dequènes (Duck) | node 'content' do
|
|
4761cd13 | Marc Dequènes (Duck) | on_request do |request|
|
|
request.reply.results = {:content => zone.content}
|
|||
end
|
|||
end
|
|||
66a02240 | Marc Dequènes (Duck) | node 'content=' do
|
|
4761cd13 | Marc Dequènes (Duck) | on_request do |request|
|
|
content = request.args.shift
|
|||
if content.empty?
|
|||
request.errors << "Zone content missing"
|
|||
return
|
|||
end
|
|||
90197e7b | Marc Dequènes (Duck) | begin
|
|
zone.content = content
|
|||
rescue CyberError => e
|
|||
request.reply.errors << e.message
|
|||
4761cd13 | Marc Dequènes (Duck) | end
|
|
end
|
|||
end
|