Cover `folder/pullerrors` as well in option for deprecated routes
This commit is contained in:
parent
734fc170a4
commit
d7c5a66cc8
|
@ -351,6 +351,7 @@ private Q_SLOTS:
|
|||
void recalculateStatus();
|
||||
QString configPath() const;
|
||||
QByteArray changeConfigVerb() const;
|
||||
QString folderErrorsPath() const;
|
||||
|
||||
private:
|
||||
// internal helper methods
|
||||
|
|
|
@ -224,6 +224,14 @@ QByteArray SyncthingConnection::changeConfigVerb() const
|
|||
return isUsingDeprecatedRoutes() ? QByteArray("POST") : QByteArray("PUT");
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns the path to Syncthing's route to retrieve errors depending on whether deprecated routes should be used.
|
||||
*/
|
||||
QString SyncthingConnection::folderErrorsPath() const
|
||||
{
|
||||
return isUsingDeprecatedRoutes() ? QStringLiteral("folder/pullerrors") : QStringLiteral("folder/errors");
|
||||
}
|
||||
|
||||
// pause/resume devices
|
||||
|
||||
/*!
|
||||
|
@ -1113,7 +1121,7 @@ void SyncthingConnection::requestDirPullErrors(const QString &dirId, int page, i
|
|||
query.addQueryItem(QStringLiteral("page"), QString::number(page));
|
||||
query.addQueryItem(QStringLiteral("perpage"), QString::number(perPage));
|
||||
}
|
||||
auto *const reply = requestData(QStringLiteral("folder/pullerrors"), query);
|
||||
auto *const reply = requestData(folderErrorsPath(), query);
|
||||
reply->setProperty("dirId", dirId);
|
||||
QObject::connect(reply, &QNetworkReply::finished, this, &SyncthingConnection::readDirPullErrors);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue