2
0
mirror of https://github.com/VinylDNS/vinyldns synced 2025-08-30 13:58:15 +00:00

convert response message from json string to json

This commit is contained in:
nspadaccino
2025-05-21 16:51:05 -04:00
parent 9e859470b0
commit d7f9c3a456
3 changed files with 7 additions and 4 deletions

View File

@@ -214,12 +214,15 @@ class ZoneService(
responseMessage: String = Source.fromInputStream(inputStream, "UTF-8").mkString
_ <- isValidGenerateZoneConn(responseCode, responseMessage).toResult
// Parse response
responseJson = parse(responseMessage)
// Create response object
zoneGenerateResponse = ZoneGenerationResponse(
provider = request.provider,
responseCode = responseCode,
status = dnsConnResponse.getResponseMessage,
message = responseMessage
message = responseJson
)
// Save to repository

View File

@@ -249,7 +249,7 @@ case class ZoneGenerationResponse(
provider: String,
responseCode: Int,
status: String,
message: String
message: JValue
)
case class ZoneGenerationInput(

View File

@@ -224,7 +224,7 @@ trait ProtobufConversions {
zgr.getProvider,
zgr.getResponseCode.toInt,
zgr.getStatus,
zgr.getMessage
parse(zgr.getMessage)
)
def fromPB(rd: VinylDNSProto.RecordData, rt: RecordType): RecordData =
@@ -533,7 +533,7 @@ trait ProtobufConversions {
.setProvider(zgr.provider)
.setResponseCode(zgr.responseCode.toLong)
.setStatus(zgr.status)
.setMessage(zgr.message)
.setMessage(compact(render(zgr.message)))
.build()
def fromPB(data: VinylDNSProto.User): User =