aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/refresh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/refresh.cpp')
-rw-r--r--lib/csapi/refresh.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/csapi/refresh.cpp b/lib/csapi/refresh.cpp
index 8d4a34ae..284ae4ff 100644
--- a/lib/csapi/refresh.cpp
+++ b/lib/csapi/refresh.cpp
@@ -10,8 +10,9 @@ RefreshJob::RefreshJob(const QString& refreshToken)
: BaseJob(HttpVerb::Post, QStringLiteral("RefreshJob"),
makePath("/_matrix/client/v3", "/refresh"), false)
{
- QJsonObject _data;
- addParam<IfNotEmpty>(_data, QStringLiteral("refresh_token"), refreshToken);
- setRequestData(std::move(_data));
+ QJsonObject _dataJson;
+ addParam<IfNotEmpty>(_dataJson, QStringLiteral("refresh_token"),
+ refreshToken);
+ setRequestData({ _dataJson });
addExpectedKey("access_token");
}