From 1d2e56f19df6992db35b8115a5be3f3333d7378a Mon Sep 17 00:00:00 2001 From: apa420 Date: Thu, 12 Jul 2018 11:11:21 +0200 Subject: [PATCH] changed return-value of errors to false --- src/providers/twitch/TwitchApi.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/providers/twitch/TwitchApi.cpp b/src/providers/twitch/TwitchApi.cpp index 06c3380fa..a1363a813 100644 --- a/src/providers/twitch/TwitchApi.cpp +++ b/src/providers/twitch/TwitchApi.cpp @@ -21,18 +21,18 @@ void TwitchApi::findUserId(const QString user, std::function succ if (!root.value("users").isArray()) { Log("API Error while getting user id, users is not an array"); successCallback(""); - return true; + return false; } auto users = root.value("users").toArray(); if (users.size() != 1) { Log("API Error while getting user id, users array size is not 1"); successCallback(""); - return true; + return false; } if (!users[0].isObject()) { Log("API Error while getting user id, first user is not an object"); successCallback(""); - return true; + return false; } auto firstUser = users[0].toObject(); auto id = firstUser.value("_id"); @@ -40,7 +40,7 @@ void TwitchApi::findUserId(const QString user, std::function succ Log("API Error: while getting user id, first user object `_id` key is not a " "string"); successCallback(""); - return true; + return false; } successCallback(id.toString()); return true;