diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-01-05 19:46:41 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-01-09 11:54:42 +0900 |
commit | 01806d00977578681a401ad294a957ecec0a3d53 (patch) | |
tree | d3fe1b4e4e7b77439046ca2e36a0218226b62fc9 /jobs/generated/inviting.cpp | |
parent | 7169338dedbf0184da4c971e7cecb6be13b1d129 (diff) | |
download | libquotient-01806d00977578681a401ad294a957ecec0a3d53.tar.gz libquotient-01806d00977578681a401ad294a957ecec0a3d53.zip |
jobs: expect application/json by default; set query in constructor body; properly convert numbers to strings in query
The query should be set in constructor body because there's no reason to pass non-required parameters into the query.
As for numbers to strings conversion - there was an attempt to use QJsonValue(a).toString() for that. That doesn't work; QJsonValue does not turn numbers to strings.
Diffstat (limited to 'jobs/generated/inviting.cpp')
-rw-r--r-- | jobs/generated/inviting.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/jobs/generated/inviting.cpp b/jobs/generated/inviting.cpp index 6cd67ad7..d2ee2107 100644 --- a/jobs/generated/inviting.cpp +++ b/jobs/generated/inviting.cpp @@ -14,14 +14,10 @@ static const auto basePath = QStringLiteral("/_matrix/client/r0"); InviteUserJob::InviteUserJob(const QString& roomId, const QString& userId) : BaseJob(HttpVerb::Post, "InviteUserJob", - basePath % "/rooms/" % roomId % "/invite", - Query { } - ) + basePath % "/rooms/" % roomId % "/invite") { QJsonObject _data; _data.insert("user_id", toJson(userId)); setRequestData(_data); - - addExpectedContentType("application/json"); } |