Fix ApiServerConnection::postNoResponse

This commit is contained in:
Roland Rossgotterer
2019-09-19 17:28:20 +02:00
committed by Mat Sutcliffe
parent acb5b11966
commit 44146353a6
3 changed files with 3 additions and 5 deletions

View File

@@ -221,7 +221,6 @@ namespace BlackCore
transceiver.HeightAglM = height;
transceiver.HeightMslM = height;
}
updateTransceivers();
}
void AFVClient::updateTransceivers()

View File

@@ -127,7 +127,6 @@ namespace BlackCore
void ApiServerConnection::postNoResponse(const QString &resource, const QJsonDocument &json)
{
Q_UNUSED(json);
if (isShuttingDown()) { return; } // avoid crash
if (! m_isAuthenticated)
{
@@ -147,7 +146,7 @@ namespace BlackCore
QNetworkRequest request(url);
request.setRawHeader("Authorization", "Bearer " + m_jwt);
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
QScopedPointer<QNetworkReply, QScopedPointerDeleteLater> reply(nam->deleteResource(request));
QScopedPointer<QNetworkReply, QScopedPointerDeleteLater> reply(nam->post(request, json.toJson()));
while (! reply->isFinished()) { loop.exec(); }
qDebug() << "POST" << resource << "(" << m_watch.elapsed() << "ms)";