return makeRecordContent(qtype, content, true);
}
-static Json::object getZoneInfo(const DomainInfo& di) {
- DNSSECKeeper dk;
+static Json::object getZoneInfo(const DomainInfo& di, DNSSECKeeper *dk) {
string zoneId = apiZoneNameToId(di.zone);
return Json::object {
// id is the canonical lookup key, which doesn't actually match the name (in some cases)
{ "url", "/api/v1/servers/localhost/zones/" + zoneId },
{ "name", di.zone.toString() },
{ "kind", di.getKindString() },
- { "dnssec", dk.isSecuredZone(di.zone) },
+ { "dnssec", dk->isSecuredZone(di.zone) },
{ "account", di.account },
{ "masters", di.masters },
{ "serial", (double)di.serial },
if(!B.getDomainInfo(zonename, di))
throw ApiException("Could not find domain '"+zonename.toString()+"'");
- Json::object doc = getZoneInfo(di);
+ DNSSECKeeper dk;
+ Json::object doc = getZoneInfo(di, &dk);
// extra stuff getZoneInfo doesn't do for us (more expensive)
string soa_edit_api;
di.backend->getDomainMetadataOne(zonename, "SOA-EDIT-API", soa_edit_api);
Json::array doc;
for(const DomainInfo& di : domains) {
- doc.push_back(getZoneInfo(di));
+ doc.push_back(getZoneInfo(di, &dk));
}
resp->setBody(doc);
}