aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/login.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/login.cpp')
-rw-r--r--lib/csapi/login.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/csapi/login.cpp b/lib/csapi/login.cpp
index 3956a1c4..363b6037 100644
--- a/lib/csapi/login.cpp
+++ b/lib/csapi/login.cpp
@@ -76,20 +76,21 @@ class LoginJob::Private
static const auto LoginJobName = QStringLiteral("LoginJob");
-LoginJob::LoginJob(const QString& type, const QString& user, const QString& medium, const QString& address, const QString& password, const QString& token, const QString& deviceId, const QString& initialDeviceDisplayName)
+LoginJob::LoginJob(const QString& type, const Omittable<UserIdentifier>& identifier, const QString& password, const QString& token, const QString& deviceId, const QString& initialDeviceDisplayName, const QString& user, const QString& medium, const QString& address)
: BaseJob(HttpVerb::Post, LoginJobName,
basePath % "/login", false)
, d(new Private)
{
QJsonObject _data;
addParam<>(_data, QStringLiteral("type"), type);
- addParam<IfNotEmpty>(_data, QStringLiteral("user"), user);
- addParam<IfNotEmpty>(_data, QStringLiteral("medium"), medium);
- addParam<IfNotEmpty>(_data, QStringLiteral("address"), address);
+ addParam<IfNotEmpty>(_data, QStringLiteral("identifier"), identifier);
addParam<IfNotEmpty>(_data, QStringLiteral("password"), password);
addParam<IfNotEmpty>(_data, QStringLiteral("token"), token);
addParam<IfNotEmpty>(_data, QStringLiteral("device_id"), deviceId);
addParam<IfNotEmpty>(_data, QStringLiteral("initial_device_display_name"), initialDeviceDisplayName);
+ addParam<IfNotEmpty>(_data, QStringLiteral("user"), user);
+ addParam<IfNotEmpty>(_data, QStringLiteral("medium"), medium);
+ addParam<IfNotEmpty>(_data, QStringLiteral("address"), address);
setRequestData(_data);
}