return warnings in response instead of response.result (#182)

This commit is contained in:
Nathan Nichols
2022-06-17 15:15:14 -05:00
committed by GitHub
parent a62849b89a
commit 54669420bf
2 changed files with 2 additions and 3 deletions

View File

@@ -436,7 +436,7 @@ handle_request(
// reserialize only if a warning was appended.
if (warningFlag)
{
result["warning"] = warnings;
response["warning"] = warnings;
responseStr = boost::json::serialize(response);
}
return send(

View File

@@ -344,8 +344,7 @@ public:
// reserialize if a warning was appended
if (warningFlag)
{
auto& result = response["result"].as_object();
result["warning"] = warnings;
response["warning"] = warnings;
responseStr = boost::json::serialize(response);
}
send(std::move(responseStr));