From 01806d00977578681a401ad294a957ecec0a3d53 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 5 Jan 2018 19:46:41 +0900 Subject: 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. --- jobs/generated/leaving.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'jobs/generated/leaving.cpp') diff --git a/jobs/generated/leaving.cpp b/jobs/generated/leaving.cpp index 604fcc73..89c110dd 100644 --- a/jobs/generated/leaving.cpp +++ b/jobs/generated/leaving.cpp @@ -14,15 +14,13 @@ static const auto basePath = QStringLiteral("/_matrix/client/r0"); LeaveRoomJob::LeaveRoomJob(const QString& roomId) : BaseJob(HttpVerb::Post, "LeaveRoomJob", - basePath % "/rooms/" % roomId % "/leave", - Query { } - ) -{ } + basePath % "/rooms/" % roomId % "/leave") +{ +} ForgetRoomJob::ForgetRoomJob(const QString& roomId) : BaseJob(HttpVerb::Post, "ForgetRoomJob", - basePath % "/rooms/" % roomId % "/forget", - Query { } - ) -{ } + basePath % "/rooms/" % roomId % "/forget") +{ +} -- cgit v1.2.3