Handle incorrect passwords properly with export

Fixes !5
This commit is contained in:
Aditya Kulkarni
2019-10-31 14:26:04 -07:00
parent 0d5ea2f5a5
commit 851a13c11b
4 changed files with 87 additions and 98 deletions

View File

@@ -122,14 +122,13 @@ private:
};
inline bool isJsonSuccess(const json& res) {
inline bool isJsonResultSuccess(const json& res) {
return res.find("result") != res.end() &&
QString::fromStdString(res["result"].get<json::string_t>()) == "success";
}
inline bool isJsonError(const json& res) {
return res.find("result") != res.end() &&
QString::fromStdString(res["result"].get<json::string_t>()) == "error";
return res.find("error") != res.end();
}