Skip to content

Commit 0bce5f9

Browse files
committed
Fix JSON formatting for reverse DNS API requests
1 parent 43f677f commit 0bce5f9

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/corelib/Providers/Rackspace/CloudDnsProvider.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,8 @@ public Task<DnsJob<DnsRecordsList>> AddPtrRecordsAsync(string serviceName, Uri d
893893
new JProperty("href", new JValue(deviceResourceUri.AbsoluteUri)),
894894
new JProperty("rel", new JValue(serviceName)),
895895
new JProperty("content", new JValue(string.Empty)))),
896-
new JProperty("records", JArray.FromObject(recordConfigurations)));
896+
new JProperty("recordsList", new JObject(
897+
new JProperty("records", JArray.FromObject(recordConfigurations)))));
897898
Func<Task<Tuple<IdentityToken, Uri>>, Task<HttpWebRequest>> prepareRequest =
898899
PrepareRequestAsyncFunc(HttpMethod.POST, template, parameters, request);
899900

@@ -938,8 +939,8 @@ public Task<DnsJob> UpdatePtrRecordsAsync(string serviceName, Uri deviceResource
938939
new JProperty("href", new JValue(deviceResourceUri.AbsoluteUri)),
939940
new JProperty("rel", new JValue(serviceName)),
940941
new JProperty("content", new JValue(string.Empty)))),
941-
new JProperty("recordsList",
942-
new JProperty("records", JArray.FromObject(recordConfigurations))));
942+
new JProperty("recordsList", new JObject(
943+
new JProperty("records", JArray.FromObject(recordConfigurations)))));
943944
Func<Task<Tuple<IdentityToken, Uri>>, Task<HttpWebRequest>> prepareRequest =
944945
PrepareRequestAsyncFunc(HttpMethod.PUT, template, parameters, request);
945946

0 commit comments

Comments
 (0)