1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-03 06:24:48 -04:00

REST API: config: PUT (5): mapper work and rework. ChannelAnalyzer complements

This commit is contained in:
f4exb
2019-08-09 18:45:10 +02:00
parent 4897e82e28
commit c777ec881d
9 changed files with 360 additions and 39 deletions
+15 -11
View File
@@ -378,20 +378,24 @@ void WebAPIRequestMapper::instanceConfigService(qtwebapp::HttpRequest& request,
if (validateConfig(query, jsonObject, configKeys))
{
configKeys.debug();
int status = 200;
// int status = m_adapter->instanceConfigPutPatch(
// true,
// query,
// configKeys,
// normalResponse,
// errorResponse
// );
int status = m_adapter->instanceConfigPutPatch(
true,
query,
configKeys,
normalResponse,
errorResponse
);
response.setStatus(status);
qDebug("WebAPIRequestMapper::instanceConfigService: PUT: %d", status);
if (status/100 == 2) {
if (status/100 == 2)
{
normalResponse.setMessage(new QString("Configuration updated successfully"));
response.write(normalResponse.asJson().toUtf8());
} else {
}
else
{
normalResponse.setMessage(new QString("Error occured while updating configuration"));
response.write(errorResponse.asJson().toUtf8());
}
}