aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/logout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/logout.cpp')
-rw-r--r--lib/csapi/logout.cpp33
1 files changed, 10 insertions, 23 deletions
diff --git a/lib/csapi/logout.cpp b/lib/csapi/logout.cpp
index 6e209e07..9ec54c71 100644
--- a/lib/csapi/logout.cpp
+++ b/lib/csapi/logout.cpp
@@ -4,39 +4,26 @@
#include "logout.h"
-#include "converters.h"
-
-#include <QtCore/QStringBuilder>
-
-using namespace QMatrixClient;
-
-static const auto basePath = QStringLiteral("/_matrix/client/r0");
+using namespace Quotient;
QUrl LogoutJob::makeRequestUrl(QUrl baseUrl)
{
return BaseJob::makeRequestUrl(std::move(baseUrl),
- basePath % "/logout");
+ makePath("/_matrix/client/v3", "/logout"));
}
-static const auto LogoutJobName = QStringLiteral("LogoutJob");
-
LogoutJob::LogoutJob()
- : BaseJob(HttpVerb::Post, LogoutJobName,
- basePath % "/logout")
-{
-}
+ : BaseJob(HttpVerb::Post, QStringLiteral("LogoutJob"),
+ makePath("/_matrix/client/v3", "/logout"))
+{}
QUrl LogoutAllJob::makeRequestUrl(QUrl baseUrl)
{
- return BaseJob::makeRequestUrl(std::move(baseUrl),
- basePath % "/logout/all");
+ return BaseJob::makeRequestUrl(
+ std::move(baseUrl), makePath("/_matrix/client/v3", "/logout/all"));
}
-static const auto LogoutAllJobName = QStringLiteral("LogoutAllJob");
-
LogoutAllJob::LogoutAllJob()
- : BaseJob(HttpVerb::Post, LogoutAllJobName,
- basePath % "/logout/all")
-{
-}
-
+ : BaseJob(HttpVerb::Post, QStringLiteral("LogoutAllJob"),
+ makePath("/_matrix/client/v3", "/logout/all"))
+{}