aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/pushrules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/pushrules.cpp')
-rw-r--r--lib/csapi/pushrules.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/csapi/pushrules.cpp b/lib/csapi/pushrules.cpp
index 22976641..ea8ad02a 100644
--- a/lib/csapi/pushrules.cpp
+++ b/lib/csapi/pushrules.cpp
@@ -80,11 +80,7 @@ const PushRule& GetPushRuleJob::data() const
BaseJob::Status GetPushRuleJob::parseJson(const QJsonDocument& data)
{
- auto json = data.object();
- if (!json.contains("data"_ls))
- return { JsonParseError,
- "The key 'data' not found in the response" };
- d->data = fromJson<PushRule>(json.value("data"_ls));
+ d->data = fromJson<PushRule>(data);
return Success;
}