aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/whoami.cpp
diff options
context:
space:
mode:
authorMarc Deop <marc@marcdeop.com>2019-03-02 12:26:57 +0100
committerMarc Deop <marc@marcdeop.com>2019-03-02 12:26:57 +0100
commitaacc4bcb4a487871daae6717f77605aaba444341 (patch)
tree4f50b6874821667ccb6b91c017e5d041e3846112 /lib/csapi/whoami.cpp
parentc971b924cd62822ed6fb1a0291c483ae73a3ecda (diff)
downloadlibquotient-aacc4bcb4a487871daae6717f77605aaba444341.tar.gz
libquotient-aacc4bcb4a487871daae6717f77605aaba444341.zip
style: apply .clang-format to all .cpp and .h files
Diffstat (limited to 'lib/csapi/whoami.cpp')
-rw-r--r--lib/csapi/whoami.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/csapi/whoami.cpp b/lib/csapi/whoami.cpp
index aebdf5d3..f0a77aee 100644
--- a/lib/csapi/whoami.cpp
+++ b/lib/csapi/whoami.cpp
@@ -15,38 +15,34 @@ static const auto basePath = QStringLiteral("/_matrix/client/r0");
class GetTokenOwnerJob::Private
{
public:
- QString userId;
+ QString userId;
};
QUrl GetTokenOwnerJob::makeRequestUrl(QUrl baseUrl)
{
return BaseJob::makeRequestUrl(std::move(baseUrl),
- basePath % "/account/whoami");
+ basePath % "/account/whoami");
}
static const auto GetTokenOwnerJobName = QStringLiteral("GetTokenOwnerJob");
GetTokenOwnerJob::GetTokenOwnerJob()
: BaseJob(HttpVerb::Get, GetTokenOwnerJobName,
- basePath % "/account/whoami")
- , d(new Private)
+ basePath % "/account/whoami"),
+ d(new Private)
{
}
GetTokenOwnerJob::~GetTokenOwnerJob() = default;
-const QString& GetTokenOwnerJob::userId() const
-{
- return d->userId;
-}
+const QString& GetTokenOwnerJob::userId() const { return d->userId; }
BaseJob::Status GetTokenOwnerJob::parseJson(const QJsonDocument& data)
{
auto json = data.object();
if (!json.contains("user_id"_ls))
return { JsonParseError,
- "The key 'user_id' not found in the response" };
+ "The key 'user_id' not found in the response" };
fromJson(json.value("user_id"_ls), d->userId);
return Success;
}
-