Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3rdParty/TargomanDBM
2 changes: 1 addition & 1 deletion App/Server/clsAPIObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ void clsAPIObject::invokeMethod(

for (int i=0; i<_arguments.size(); ++i)
cleanArgAt(i); //CLEAN_ARG_AT(i);
} catch (...) {
} catch (std::exception &_exp) {

for (int i=0; i<_arguments.size(); ++i)
cleanArgAt(i); //CLEAN_ARG_AT(i);
Expand Down
17 changes: 11 additions & 6 deletions Interfaces/Helpers/RESTClientHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,18 @@ QVariant RESTClientHelper::callAPI(
auto makeURL = [_aPIURL, _api, _urlArgs]() {
QUrlQuery URLQuery;

auto DocArgs = QJsonDocument::fromVariant(_urlArgs);
for (auto it = DocArgs.object().begin(); it != DocArgs.object().end(); ++it) {
QString ValueToString;
auto DocArgs = QJsonDocument::fromVariant(_urlArgs).object();
for (auto it = DocArgs.begin(); it != DocArgs.end(); it++) {

QString Key = it.key();
auto Value = it.value();

QString ValueToString = "";

if (Value.isObject()) {
auto o = Value.toObject();
///@TODO: complete this
// auto o = Value.toObject();
ValueToString = Value.toVariant().toString();
} else if (Value.isArray()) {
auto a = Value.toArray();
foreach (auto v, a) {
Expand All @@ -202,9 +207,9 @@ QVariant RESTClientHelper::callAPI(
// if (v.isString()) ValueToString += "'";
}
} else
ValueToString = Value.toString();
ValueToString = Value.toVariant().toString();

URLQuery.addQueryItem(it.key(), ValueToString);
URLQuery.addQueryItem(Key, ValueToString);
}

// for (auto it = _urlArgs.begin(); it != _urlArgs.end(); ++it) {
Expand Down
4 changes: 2 additions & 2 deletions Modules/Account/functionalTest/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ int main(int _argc, char *_argv[]) {
// if (BreakOnFirstFail && !FailedTests) FailedTests += QTest::qExec(new testAPITokens(DBPrefix), progArgsCount, progArgs);
} catch (exTargomanBase &e) {
++FailedTests;
qDebug() << "*** EXCEPTION ***" << QString("error(%1):%2").arg(e.code()).arg(e.what());
qDebug() << endl << "*** EXCEPTION ***" << QString("error(%1):%2").arg(e.code()).arg(e.what()) << endl;
} catch (std::exception &e) {
++FailedTests;
qDebug() << "*** EXCEPTION ***" << e.what();
qDebug() << endl << "*** EXCEPTION ***" << e.what() << endl;
}

if (FailedTests > 0)
Expand Down
187 changes: 122 additions & 65 deletions Modules/Account/functionalTest/testAccount.hpp

Large diffs are not rendered by default.

Loading