diff --git a/App/Server/OpenAPIGenerator.cpp b/App/Server/OpenAPIGenerator.cpp index 950017b2..5faf90b4 100644 --- a/App/Server/OpenAPIGenerator.cpp +++ b/App/Server/OpenAPIGenerator.cpp @@ -112,17 +112,15 @@ QJsonObject OpenAPIGenerator::retrieveJson( clsAPIObject* APIObject = RESTAPIRegistry::Registry.value(Key); - if (Key == "GET /Account/OfflinePayments") - qDebug() << "*******************************************"; - - qDebug() << Key << endl - << " " << APIObject->ParamNames.count() << " : " << APIObject->ParamNames.join(", ") << endl - << " " << APIObject->ParamTypesName.count() << " : " << APIObject->ParamTypesName.join(", ") << endl - << " " << APIObject->BaseMethod.DefaultValues.count() << " : " << APIObject->BaseMethod.DefaultValues << endl - ; - - if (APIObject->BaseMethod.DefaultValues.count() != APIObject->ParamNames.count()) - qDebug() << "<><><><><><><><><><><><><><><><><><><><><><><><><><><>" << endl; + qDebug().noquote().nospace() + << Key << endl + << " ParamNames: [" << APIObject->ParamNames.count() << "] " << APIObject->ParamNames.join(", ") << endl + << " ParamTypesName: [" << APIObject->ParamTypesName.count() << "] " << APIObject->ParamTypesName.join(", ") << endl + << " DefaultValues: [" << APIObject->BaseMethod.DefaultValues.count() << "] " << APIObject->BaseMethod.DefaultValues << endl + << (APIObject->BaseMethod.DefaultValues.count() != APIObject->ParamNames.count() + ? " ******************** ERROR IN COUNTERS ********************" + : "") + ; } #endif diff --git a/App/Server/RESTAPIRegistry.cpp b/App/Server/RESTAPIRegistry.cpp index 119fbcec..534a0416 100644 --- a/App/Server/RESTAPIRegistry.cpp +++ b/App/Server/RESTAPIRegistry.cpp @@ -260,7 +260,7 @@ void RESTAPIRegistry::registerRESTAPI( QString ParameterTypeName = parameterTypes.at(ParamIndex); //check APICallBoom - if (ParameterTypeName.startsWith(APICALLBOOM_TYPE_NAME_BASE)) { + if (ParameterTypeName.startsWith(APICALLBOOM_TYPE_BASE_STR)) { DefaultValues.append(QVariant()); continue; } @@ -506,7 +506,7 @@ void RESTAPIRegistry::validateMethodInputAndOutput(const QMetaMethod& _method) { QString ParameterTypeName = parameterTypes.at(i); //check APICallBoom - if (ParameterTypeName.startsWith(APICALLBOOM_TYPE_NAME_BASE)) { + if (ParameterTypeName.startsWith(APICALLBOOM_TYPE_BASE_STR)) { if (HasApiCallBoomParam) throw exRESTRegistry(QString("Invalid duplicate APICALLBOOM parameter (%1) at %2 of %3") .arg(_method.parameterNames().at(i).constData()) diff --git a/App/Server/StaticModule.cpp b/App/Server/StaticModule.cpp index 05db49f0..f249d231 100644 --- a/App/Server/StaticModule.cpp +++ b/App/Server/StaticModule.cpp @@ -35,7 +35,7 @@ StaticModule::StaticModule() : { ; } TAPI::RawData_t IMPL_REST_GET_OR_POST(StaticModule, openAPI_json, ( - APICallBoom &_APICALLBOOM + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM )) { gServerStats.Success.inc(); @@ -49,17 +49,15 @@ TAPI::RawData_t IMPL_REST_GET_OR_POST(StaticModule, openAPI_json, ( } QVariant IMPL_REST_GET_OR_POST(StaticModule, openAPI_yaml, ( - APICallBoom &_APICALLBOOM + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM )) { - Q_UNUSED(_APICALLBOOM) - throw exHTTPMethodNotAllowed("Yaml openAPI is not implemented yet"); } //TAPI::ResponseRedirect_t //TAPI::FileData_t QVariant IMPL_REST_GET_OR_POST(StaticModule, swaggerui, ( - APICallBoom &_APICALLBOOM + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM )) { if (ServerConfigs::SwaggerUI.value().isEmpty()) throw exHTTPNotFound("Swagger is not configured"); @@ -78,21 +76,17 @@ QVariant IMPL_REST_GET_OR_POST(StaticModule, swaggerui, ( } QVariant IMPL_REST_GET_OR_POST(StaticModule, stats_json, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, bool _full )) { - Q_UNUSED(_APICALLBOOM) - gServerStats.Success.inc(); return gServerStats.toJson(_full); } QVariant IMPL_REST_GET_OR_POST(StaticModule, version, ( - APICallBoom &_APICALLBOOM + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM )) { - Q_UNUSED(_APICALLBOOM) - gServerStats.Success.inc(); QJsonObject Version; @@ -107,10 +101,8 @@ QVariant IMPL_REST_GET_OR_POST(StaticModule, version, ( } QVariant IMPL_REST_GET_OR_POST(StaticModule, ping, ( - APICallBoom &_APICALLBOOM + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM )) { - Q_UNUSED(_APICALLBOOM) - gServerStats.Success.inc(); return QJsonObject({ diff --git a/App/Server/StaticModule.h b/App/Server/StaticModule.h index 30bb294f..857a6a9c 100644 --- a/App/Server/StaticModule.h +++ b/App/Server/StaticModule.h @@ -42,7 +42,7 @@ private slots: openAPI_json, "openAPI.json", ( - APICallBoom &_APICALLBOOM + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM ), "" ); @@ -51,7 +51,7 @@ private slots: openAPI_yaml, "openAPI.yaml", ( - APICallBoom &_APICALLBOOM + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM ), "" ); @@ -61,7 +61,7 @@ private slots: QVariant REST_GET_OR_POST( swaggerui, ( - APICallBoom &_APICALLBOOM + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM ), "" ); @@ -70,7 +70,7 @@ private slots: stats_json, "stats.json", ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, bool _full = false ), "" @@ -79,7 +79,7 @@ private slots: QVariant REST_GET_OR_POST( version, ( - APICallBoom &_APICALLBOOM + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM ), "" ); @@ -87,7 +87,7 @@ private slots: QVariant REST_GET_OR_POST( ping, ( - APICallBoom &_APICALLBOOM + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM ), "" ); diff --git a/App/Server/clsAPIObject.cpp b/App/Server/clsAPIObject.cpp index 8d25a2d9..c35d9f02 100644 --- a/App/Server/clsAPIObject.cpp +++ b/App/Server/clsAPIObject.cpp @@ -23,6 +23,7 @@ #include "clsAPIObject.h" #include "APICache.hpp" +#include "Interfaces/Server/APICallBoom.h" namespace Targoman::API::Server { @@ -62,15 +63,15 @@ clsAPIObject::clsAPIObject( foreach (const QByteArray &ParamName, _method.parameterNames()) { QString ParameterTypeName = parameterTypes.at(i); - /*if (ParameterTypeName.startsWith(APICALLBOOM_JWT_TYPE_NAME)) { + /*if (ParameterTypeName.startsWith(APICALLBOOM_TYPE_JWT_DECL)) { this->ParamNames.append("JWT"); this->ParamTypesName.append(PARAM_JWT); this->ParamTypesID.append(QMetaType::type(PARAM_JWT)); this->BaseMethod.DefaultValues[0] = {}; - } else */if (ParameterTypeName.startsWith(APICALLBOOM_TYPE_NAME_BASE)) { //APICALLBOOM_NO_TYPE_NAME)) { + } else */if (ParameterTypeName.startsWith(APICALLBOOM_TYPE_BASE_STR)) { //APICALLBOOM_TYPE_NO_JWT_DECL)) { --this->RequiredParamsCount; this->BaseMethod.DefaultValues.removeAt(0); - if (ParameterTypeName.startsWith(APICALLBOOM_JWT_TYPE_NAME)) + if (ParameterTypeName.startsWith(APICALLBOOM_TYPE_JWT_DECL_STR)) this->RequiresJWT = true; } else { QByteArray ParamNameNoUnderScore = (ParamName.startsWith('_') ? ParamName.mid(1) : ParamName); diff --git a/App/Server/clsAPIObject.h b/App/Server/clsAPIObject.h index aeb5c5a2..e49dba23 100644 --- a/App/Server/clsAPIObject.h +++ b/App/Server/clsAPIObject.h @@ -32,11 +32,6 @@ namespace Targoman::API::Server { -#define APICALLBOOM_TYPE_NAME_BASE "APICallBoom<" -#define APICALLBOOM_NO_TYPE_NAME "APICallBoom" -#define APICALLBOOM_JWT_TYPE_NAME "APICallBoom" -#define APICALLBOOM_PARAM_NAME "_APICALLBOOM" - #define PARAM_JWT "TAPI::JWT_t" #define PARAM_COOKIES "TAPI::COOKIES_t" #define PARAM_REMOTE_IP "TAPI::RemoteIP_t" diff --git a/App/Server/clsRequestHandler.cpp b/App/Server/clsRequestHandler.cpp index 24a10ff5..a53071ca 100644 --- a/App/Server/clsRequestHandler.cpp +++ b/App/Server/clsRequestHandler.cpp @@ -274,9 +274,9 @@ clsRequestHandler::stuResult clsRequestHandler::run( QScopedPointer APICALLBOOM; if (_apiObject->requiresJWT()) - APICALLBOOM.reset(new APICallBoom()); + APICALLBOOM.reset(new APICALLBOOM_TYPE_JWT_DECL()); else - APICALLBOOM.reset(new APICallBoom()); + APICALLBOOM.reset(new APICALLBOOM_TYPE_NO_JWT_DECL()); try { for (auto QueryIter = _queries.begin(); QueryIter != _queries.end(); ++QueryIter) diff --git a/Interfaces/AAA/Accounting_Interfaces.cpp b/Interfaces/AAA/Accounting_Interfaces.cpp index d584e262..ede45035 100644 --- a/Interfaces/AAA/Accounting_Interfaces.cpp +++ b/Interfaces/AAA/Accounting_Interfaces.cpp @@ -428,7 +428,7 @@ QVariant intfAccountUserAssets::apiGET(GET_METHOD_ARGS_IMPL_APICALL) { } bool intfAccountUserAssets::apiUPDATEsetAsPrefered( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, TAPI::PKsByPath_t _pksByPath ) { bool Ok; @@ -444,7 +444,7 @@ bool intfAccountUserAssets::apiUPDATEsetAsPrefered( } bool intfAccountUserAssets::apiUPDATEdisablePackage( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, TAPI::PKsByPath_t _pksByPath ) { bool Ok; diff --git a/Interfaces/AAA/Accounting_Interfaces.h b/Interfaces/AAA/Accounting_Interfaces.h index ef1e9831..c20735dc 100644 --- a/Interfaces/AAA/Accounting_Interfaces.h +++ b/Interfaces/AAA/Accounting_Interfaces.h @@ -83,7 +83,7 @@ private slots: bool REST_UPDATE( disablePackage, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, TAPI::PKsByPath_t _pksByPath ), "Mark a user Asset banned by priviledged user" @@ -92,7 +92,7 @@ private slots: bool REST_UPDATE( setAsPrefered, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, TAPI::PKsByPath_t _pksByPath ), "Mark a user Asset as prefered" diff --git a/Interfaces/AAA/intfAccountingBasedModule.cpp b/Interfaces/AAA/intfAccountingBasedModule.cpp index b30e4324..e82a52ad 100644 --- a/Interfaces/AAA/intfAccountingBasedModule.cpp +++ b/Interfaces/AAA/intfAccountingBasedModule.cpp @@ -118,7 +118,7 @@ stuActiveCredit intfAccountingBasedModule::activeAccountObject(quint64 _usrID) { } void intfAccountingBasedModule::checkUsageIsAllowed( - intfAPICallBoom &_APICALLBOOM, + intfAPICallBoom &APICALLBOOM_PARAM, const ServiceUsage_t &_requestedUsage ) { QJsonObject Privs = _APICALLBOOM.getJWTPrivsObject(); @@ -309,7 +309,7 @@ stuActiveCredit intfAccountingBasedModule::findBestMatchedCredit( } Targoman::API::AAA::stuPreVoucher intfAccountingBasedModule::apiPOSTaddToBasket( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, TAPI::SaleableCode_t _saleableCode, Targoman::API::AAA::OrderAdditives_t _orderAdditives, qreal _qty, @@ -745,7 +745,7 @@ Targoman::API::AAA::stuPreVoucher intfAccountingBasedModule::apiPOSTaddToBasket( } Targoman::API::AAA::stuPreVoucher intfAccountingBasedModule::apiPOSTremoveBasketItem( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, // quint64 _orderID, //it is uasID TAPI::MD5_t _itemUUID, Targoman::API::AAA::stuPreVoucher _lastPreVoucher @@ -811,7 +811,7 @@ Targoman::API::AAA::stuPreVoucher intfAccountingBasedModule::apiPOSTremoveBasket } /* Targoman::API::AAA::stuPreVoucher intfAccountingBasedModule::apiPOSTupdateBasketItem( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, TAPI::MD5_t _itemUUID, quint16 _new_qty, ///TODO: float Targoman::API::AAA::stuPreVoucher _lastPreVoucher @@ -1084,7 +1084,7 @@ void checkVoucherItemForTrustedActionSanity(stuVoucherItemForTrustedAction &_dat } bool intfAccountingBasedModule::apiPOSTprocessVoucherItem( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, Targoman::API::AAA::stuVoucherItemForTrustedAction _data ) { checkVoucherItemForTrustedActionSanity(_data); @@ -1093,7 +1093,7 @@ bool intfAccountingBasedModule::apiPOSTprocessVoucherItem( } bool intfAccountingBasedModule::apiPOSTcancelVoucherItem( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, Targoman::API::AAA::stuVoucherItemForTrustedAction _data ) { checkVoucherItemForTrustedActionSanity(_data); diff --git a/Interfaces/AAA/intfAccountingBasedModule.h b/Interfaces/AAA/intfAccountingBasedModule.h index feccd868..7a9d6cca 100644 --- a/Interfaces/AAA/intfAccountingBasedModule.h +++ b/Interfaces/AAA/intfAccountingBasedModule.h @@ -59,7 +59,7 @@ class intfAccountingBasedModule : public API::intfSQLBasedWithActionLogsModule virtual bool isUnlimited(const UsageLimits_t& _limits) const = 0; virtual bool isEmpty(const UsageLimits_t& _limits) const = 0; - void checkUsageIsAllowed(intfAPICallBoom &_APICALLBOOM, const ServiceUsage_t& _requestedUsage); + void checkUsageIsAllowed(intfAPICallBoom &APICALLBOOM_PARAM, const ServiceUsage_t& _requestedUsage); virtual bool increaseDiscountUsage( const Targoman::API::AAA::stuVoucherItem &_voucherItem @@ -124,7 +124,7 @@ protected slots: Targoman::API::AAA::stuPreVoucher REST_POST( addToBasket, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, TAPI::SaleableCode_t _saleableCode, Targoman::API::AAA::OrderAdditives_t _orderAdditives = {}, qreal _qty = 1, @@ -139,7 +139,7 @@ protected slots: Targoman::API::AAA::stuPreVoucher REST_POST( removeBasketItem, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, TAPI::MD5_t _itemUUID, Targoman::API::AAA::stuPreVoucher _lastPreVoucher ), @@ -150,7 +150,7 @@ protected slots: // Targoman::API::AAA::stuPreVoucher REST_POST( // updateBasketItem, // ( -// APICallBoom &_APICALLBOOM, +// APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, // TAPI::MD5_t _itemUUID, // quint16 _new_qty, // Targoman::API::AAA::stuPreVoucher _lastPreVoucher @@ -162,7 +162,7 @@ protected slots: bool REST_POST( processVoucherItem, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, Targoman::API::AAA::stuVoucherItemForTrustedAction _data ), "Process voucher item" @@ -171,7 +171,7 @@ protected slots: bool REST_POST( cancelVoucherItem, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, Targoman::API::AAA::stuVoucherItemForTrustedAction _data ), "Cancel voucher item" @@ -186,21 +186,19 @@ protected slots: Q_UNUSED(_assetItem) }; virtual void applyAssetAdditives( - intfAPICallBoom &_APICALLBOOM, + Q_DECL_UNUSED intfAPICallBoom &APICALLBOOM_PARAM, INOUT stuAssetItem& _assetItem, const OrderAdditives_t& _orderAdditives ) { - Q_UNUSED(_APICALLBOOM); Q_UNUSED(_assetItem) Q_UNUSED(_orderAdditives) }; virtual void applyReferrer( - intfAPICallBoom &_APICALLBOOM, + Q_DECL_UNUSED intfAPICallBoom &APICALLBOOM_PARAM, INOUT stuAssetItem& AssetItem, QString _referrer, TAPI::JSON_t _extraReferrerParams ) { - Q_UNUSED(_APICALLBOOM); Q_UNUSED(AssetItem); Q_UNUSED(_referrer); Q_UNUSED(_extraReferrerParams); diff --git a/Interfaces/API/intfPureModule.h b/Interfaces/API/intfPureModule.h index f3dbe28b..3c520dca 100644 --- a/Interfaces/API/intfPureModule.h +++ b/Interfaces/API/intfPureModule.h @@ -51,7 +51,7 @@ using namespace Targoman::API::Server; //used by Api call methods //TAPI::JWT_t _JWT, #define GET_METHOD_ARGS_HEADER_APICALL \ - APICallBoom &_APICALLBOOM, \ + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, \ TAPI::PKsByPath_t _pksByPath = {}, \ quint64 _pageIndex = 0, \ quint16 _pageSize = 20, \ @@ -63,7 +63,7 @@ using namespace Targoman::API::Server; //TAPI::JWT_t _JWT, #define GET_METHOD_ARGS_IMPL_APICALL \ - APICallBoom &_APICALLBOOM, \ + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, \ TAPI::PKsByPath_t _pksByPath, \ quint64 _pageIndex, \ quint16 _pageSize, \ @@ -94,7 +94,7 @@ using namespace Targoman::API::Server; //used by ApiQuery //quint64 _userID, #define GET_METHOD_ARGS_HEADER_INTERNAL_CALL \ - intfAPICallBoom &_APICALLBOOM, \ + intfAPICallBoom &APICALLBOOM_PARAM, \ TAPI::PKsByPath_t _pksByPath = {}, \ quint64 _pageIndex = 0, \ quint16 _pageSize = 20, \ @@ -106,7 +106,7 @@ using namespace Targoman::API::Server; //quint64 _userID, #define GET_METHOD_ARGS_IMPL_INTERNAL_CALL \ - intfAPICallBoom &_APICALLBOOM, \ + intfAPICallBoom &APICALLBOOM_PARAM, \ TAPI::PKsByPath_t _pksByPath, \ quint64 _pageIndex, \ quint16 _pageSize, \ @@ -144,8 +144,8 @@ using namespace Targoman::API::Server; |** CREATE ************************************************************| \**********************************************************************/ //used by Api call methods -#define CREATE_METHOD_ARGS_HEADER_APICALL APICallBoom &_APICALLBOOM, /*TAPI::JWT_t _JWT, */TAPI::ORMFields_t _createInfo = {} -#define CREATE_METHOD_ARGS_IMPL_APICALL APICallBoom &_APICALLBOOM, /*TAPI::JWT_t _JWT, */TAPI::ORMFields_t _createInfo +#define CREATE_METHOD_ARGS_HEADER_APICALL APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, /*TAPI::JWT_t _JWT, */TAPI::ORMFields_t _createInfo = {} +#define CREATE_METHOD_ARGS_IMPL_APICALL APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, /*TAPI::JWT_t _JWT, */TAPI::ORMFields_t _createInfo //#define CREATE_METHOD_CALL_ARGS_APICALL _JWT, _createInfo #define ORMCREATE(_doc) apiCREATE(CREATE_METHOD_ARGS_HEADER_APICALL); \ QString signOfCREATE() { return TARGOMAN_M2STR((CREATE_METHOD_ARGS_HEADER_APICALL)); } \ @@ -155,16 +155,16 @@ using namespace Targoman::API::Server; #define CREATE_METHOD_ARGS_IMPL_INTERNAL_CALL quint64 _userID, TAPI::ORMFields_t _createInfo #define CREATE_METHOD_CALL_ARGS_INTERNAL_CALL _APICALLBOOM.getUserID(), _createInfo -#define CREATE_METHOD_ARGS_HEADER_INTERNAL_CALL_1 intfAPICallBoom &_APICALLBOOM, /*quint64 _userID, */TAPI::ORMFields_t _createInfo = {} -#define CREATE_METHOD_ARGS_IMPL_INTERNAL_CALL_1 intfAPICallBoom &_APICALLBOOM, /*quint64 _userID, */TAPI::ORMFields_t _createInfo +#define CREATE_METHOD_ARGS_HEADER_INTERNAL_CALL_1 intfAPICallBoom &APICALLBOOM_PARAM, /*quint64 _userID, */TAPI::ORMFields_t _createInfo = {} +#define CREATE_METHOD_ARGS_IMPL_INTERNAL_CALL_1 intfAPICallBoom &APICALLBOOM_PARAM, /*quint64 _userID, */TAPI::ORMFields_t _createInfo #define CREATE_METHOD_CALL_ARGS_INTERNAL_CALL_1 _APICALLBOOM, /*clsJWT(_JWT).usrID(), */_createInfo /**********************************************************************\ |** UPDATE ************************************************************| \**********************************************************************/ //used by Api call methods -#define UPDATE_METHOD_ARGS_HEADER_APICALL APICallBoom &_APICALLBOOM, /*TAPI::JWT_t _JWT, */TAPI::PKsByPath_t _pksByPath = {}, const TAPI::ORMFields_t& _updateInfo = {} -#define UPDATE_METHOD_ARGS_IMPL_APICALL APICallBoom &_APICALLBOOM, /*TAPI::JWT_t _JWT, */TAPI::PKsByPath_t _pksByPath, const TAPI::ORMFields_t& _updateInfo +#define UPDATE_METHOD_ARGS_HEADER_APICALL APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, /*TAPI::JWT_t _JWT, */TAPI::PKsByPath_t _pksByPath = {}, const TAPI::ORMFields_t& _updateInfo = {} +#define UPDATE_METHOD_ARGS_IMPL_APICALL APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, /*TAPI::JWT_t _JWT, */TAPI::PKsByPath_t _pksByPath, const TAPI::ORMFields_t& _updateInfo //#define UPDATE_METHOD_CALL_ARGS_APICALL clsJWT(_JWT).usrID(), _pksByPath, _updateInfo #define ORMUPDATE(_doc) apiUPDATE(UPDATE_METHOD_ARGS_HEADER_APICALL); \ QString signOfUPDATE() { return TARGOMAN_M2STR((UPDATE_METHOD_ARGS_HEADER_APICALL)); } \ @@ -174,15 +174,15 @@ using namespace Targoman::API::Server; #define UPDATE_METHOD_ARGS_IMPL_INTERNAL_CALL quint64 _userID, TAPI::PKsByPath_t _pksByPath, const TAPI::ORMFields_t& _updateInfo #define UPDATE_METHOD_CALL_ARGS_INTERNAL_CALL _APICALLBOOM.getUserID(), _pksByPath, _updateInfo -#define UPDATE_METHOD_ARGS_HEADER_INTERNAL_CALL_1 intfAPICallBoom &_APICALLBOOM, /*quint64 _userID, */TAPI::PKsByPath_t _pksByPath = {}, const TAPI::ORMFields_t& _updateInfo = {} -#define UPDATE_METHOD_ARGS_IMPL_INTERNAL_CALL_1 intfAPICallBoom &_APICALLBOOM, /*quint64 _userID, */TAPI::PKsByPath_t _pksByPath, const TAPI::ORMFields_t& _updateInfo +#define UPDATE_METHOD_ARGS_HEADER_INTERNAL_CALL_1 intfAPICallBoom &APICALLBOOM_PARAM, /*quint64 _userID, */TAPI::PKsByPath_t _pksByPath = {}, const TAPI::ORMFields_t& _updateInfo = {} +#define UPDATE_METHOD_ARGS_IMPL_INTERNAL_CALL_1 intfAPICallBoom &APICALLBOOM_PARAM, /*quint64 _userID, */TAPI::PKsByPath_t _pksByPath, const TAPI::ORMFields_t& _updateInfo #define UPDATE_METHOD_CALL_ARGS_INTERNAL_CALL_1 _APICALLBOOM, /*clsJWT(_JWT).usrID(), */_pksByPath, _updateInfo /**********************************************************************\ |** DELETE ************************************************************| \**********************************************************************/ //used by Api call methods -#define DELETE_METHOD_ARGS_HEADER_APICALL APICallBoom &_APICALLBOOM, /*TAPI::JWT_t _JWT, */TAPI::PKsByPath_t _pksByPath = {} -#define DELETE_METHOD_ARGS_IMPL_APICALL APICallBoom &_APICALLBOOM, /*TAPI::JWT_t _JWT, */TAPI::PKsByPath_t _pksByPath +#define DELETE_METHOD_ARGS_HEADER_APICALL APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, /*TAPI::JWT_t _JWT, */TAPI::PKsByPath_t _pksByPath = {} +#define DELETE_METHOD_ARGS_IMPL_APICALL APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, /*TAPI::JWT_t _JWT, */TAPI::PKsByPath_t _pksByPath //#define DELETE_METHOD_CALL_ARGS_APICALL clsJWT(_JWT).usrID(), _pksByPath #define ORMDELETE(_doc) apiDELETE(DELETE_METHOD_ARGS_HEADER_APICALL); \ QString signOfDELETE() { return TARGOMAN_M2STR((DELETE_METHOD_ARGS_HEADER_APICALL)); } \ @@ -192,8 +192,8 @@ using namespace Targoman::API::Server; #define DELETE_METHOD_ARGS_IMPL_INTERNAL_CALL quint64 _userID, TAPI::PKsByPath_t _pksByPath #define DELETE_METHOD_CALL_ARGS_INTERNAL_CALL _APICALLBOOM.getUserID(), _pksByPath -#define DELETE_METHOD_ARGS_HEADER_INTERNAL_CALL_1 intfAPICallBoom &_APICALLBOOM, /*quint64 _userID, */TAPI::PKsByPath_t _pksByPath = {} -#define DELETE_METHOD_ARGS_IMPL_INTERNAL_CALL_1 intfAPICallBoom &_APICALLBOOM, /*quint64 _userID, */TAPI::PKsByPath_t _pksByPath +#define DELETE_METHOD_ARGS_HEADER_INTERNAL_CALL_1 intfAPICallBoom &APICALLBOOM_PARAM, /*quint64 _userID, */TAPI::PKsByPath_t _pksByPath = {} +#define DELETE_METHOD_ARGS_IMPL_INTERNAL_CALL_1 intfAPICallBoom &APICALLBOOM_PARAM, /*quint64 _userID, */TAPI::PKsByPath_t _pksByPath #define DELETE_METHOD_CALL_ARGS_INTERNAL_CALL_1 _APICALLBOOM, /*clsJWT(_JWT).usrID(), */_pksByPath namespace TAPI { diff --git a/Interfaces/Helpers/RESTClientHelper.cpp b/Interfaces/Helpers/RESTClientHelper.cpp index 8a5bcd05..c4c1b8da 100644 --- a/Interfaces/Helpers/RESTClientHelper.cpp +++ b/Interfaces/Helpers/RESTClientHelper.cpp @@ -81,7 +81,7 @@ QVariant RESTClientHelper::callAPI( } QVariant RESTClientHelper::callAPI( - intfAPICallBoom &_APICALLBOOM, + intfAPICallBoom &APICALLBOOM_PARAM, RESTClientHelper::enuHTTPMethod _method, const QString &_api, const QVariantMap &_urlArgs, diff --git a/Interfaces/Helpers/RESTClientHelper.h b/Interfaces/Helpers/RESTClientHelper.h index 85d667dc..f862ef94 100644 --- a/Interfaces/Helpers/RESTClientHelper.h +++ b/Interfaces/Helpers/RESTClientHelper.h @@ -63,7 +63,7 @@ class RESTClientHelper ); static QVariant callAPI( - intfAPICallBoom &_APICALLBOOM, + intfAPICallBoom &APICALLBOOM_PARAM, RESTClientHelper::enuHTTPMethod _method, const QString &_api, const QVariantMap &_urlArgs = {}, diff --git a/Interfaces/Server/APICallBoom.cpp b/Interfaces/Server/APICallBoom.cpp index be2ff789..97eabfb1 100644 --- a/Interfaces/Server/APICallBoom.cpp +++ b/Interfaces/Server/APICallBoom.cpp @@ -150,7 +150,7 @@ void intfAPICallBoom::addResponseHeaderNameToExpose(const QString &_header) { this->addResponseHeader("Access-Control-Expose-Headers", _header, true); } -template class APICallBoom; -template class APICallBoom; +template class APICALLBOOM_TYPE_NO_JWT_DECL; +template class APICALLBOOM_TYPE_JWT_DECL; } //namespace Targoman::API::Server diff --git a/Interfaces/Server/APICallBoom.h b/Interfaces/Server/APICallBoom.h index 78c3616b..a5b77a1f 100644 --- a/Interfaces/Server/APICallBoom.h +++ b/Interfaces/Server/APICallBoom.h @@ -27,6 +27,17 @@ #include "QString" #include "QSharedDataPointer" #include "QHttp/qhttpfwd.hpp" +#include "libTargomanCommon/Macros.h" + +#define APICALLBOOM_TYPE_BASE_STR "APICallBoom<" +#define APICALLBOOM_TYPE_NO_JWT_DECL APICallBoom +#define APICALLBOOM_TYPE_NO_JWT_DECL_STR TARGOMAN_M2STR(APICALLBOOM_TYPE_NO_JWT_DECL) +#define APICALLBOOM_TYPE_NO_JWT_IMPL Q_DECL_UNUSED APICALLBOOM_TYPE_NO_JWT_DECL +#define APICALLBOOM_TYPE_JWT_DECL APICallBoom +#define APICALLBOOM_TYPE_JWT_DECL_STR TARGOMAN_M2STR(APICALLBOOM_TYPE_JWT_DECL) +#define APICALLBOOM_TYPE_JWT_IMPL Q_DECL_UNUSED APICALLBOOM_TYPE_JWT_DECL +#define APICALLBOOM_PARAM _APICALLBOOM +#define APICALLBOOM_PARAM_STR TARGOMAN_M2STR(APICALLBOOM_PARAM) namespace Targoman::API::Server { diff --git a/Modules/Account/moduleSrc/Account.cpp b/Modules/Account/moduleSrc/Account.cpp index c81f9c98..71aa7b7c 100644 --- a/Modules/Account/moduleSrc/Account.cpp +++ b/Modules/Account/moduleSrc/Account.cpp @@ -219,7 +219,7 @@ TAPI::EncodedJWT_t Account::createJWT(const QString _login, const stuActiveAccou |* User **********************************************************| \*****************************************************************/ QString Account::apinormalizePhoneNumber( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, QString _phone, QString _country ) { @@ -227,7 +227,7 @@ QString Account::apinormalizePhoneNumber( } QVariantMap Account::apiPUTsignup( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, QString _emailOrMobile, TAPI::MD5_t _pass, QString _role, @@ -318,7 +318,7 @@ QVariantMap Account::apiPUTsignupByMobileOnly( } */ TAPI::EncodedJWT_t Account::apiPOSTapproveEmail( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, QString _email, TAPI::MD5_t _uuid, bool _autoLogin, @@ -361,7 +361,7 @@ TAPI::EncodedJWT_t Account::apiPOSTapproveEmail( } TAPI::EncodedJWT_t Account::apiPOSTapproveMobile( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, TAPI::Mobile_t _mobile, quint32 _code, bool _autoLogin, @@ -404,7 +404,7 @@ TAPI::EncodedJWT_t Account::apiPOSTapproveMobile( } TAPI::EncodedJWT_t Account::apilogin( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, QString _emailOrMobile, TAPI::MD5_t _pass, QString _salt, @@ -439,7 +439,7 @@ TAPI::EncodedJWT_t Account::apilogin( } bool Account::apiloginByMobileOnly( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, TAPI::Mobile_t _mobile, bool _signupIfNotExists, QString _signupRole @@ -469,7 +469,7 @@ bool Account::apiloginByMobileOnly( } bool Account::apiresendApprovalCode( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, QString _emailOrMobile ) { Authorization::validateIPAddress(_APICALLBOOM.getIP()); @@ -501,7 +501,7 @@ bool Account::apiresendApprovalCode( ///TODO: update cache for each module ///TODO: JWT lifetime dynamic based on current hour TAPI::EncodedJWT_t Account::apiloginByOAuth( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, TAPI::enuOAuthType::Type _type, QString _oAuthToken, TAPI::CommaSeparatedStringList_t _services, @@ -575,7 +575,7 @@ TAPI::EncodedJWT_t Account::apiloginByOAuth( //} bool Account::apilogout( - APICallBoom &_APICALLBOOM + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM ) { clsJWT JWT(_APICALLBOOM.getJWT()); @@ -588,7 +588,7 @@ bool Account::apilogout( } QString Account::apicreateForgotPasswordLink( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, QString _emailOrMobile ) { Authorization::validateIPAddress(_APICALLBOOM.getIP()); @@ -605,7 +605,7 @@ QString Account::apicreateForgotPasswordLink( #ifdef QT_DEBUG QString Account::apiPOSTfixtureGetLastForgotPasswordUUIDAndMakeAsSent( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, QString _emailOrMobile ) { QString Type = ValidateAndNormalizeEmailOrPhoneNumber(_emailOrMobile); @@ -641,7 +641,7 @@ QString Account::apiPOSTfixtureGetLastForgotPasswordUUIDAndMakeAsSent( #endif bool Account::apichangePassByUUID( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, QString _emailOrMobile, TAPI::MD5_t _uuid, TAPI::MD5_t _newPass @@ -661,7 +661,7 @@ bool Account::apichangePassByUUID( } bool Account::apichangePass( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, TAPI::MD5_t _oldPass, QString _oldPassSalt, TAPI::MD5_t _newPass @@ -682,7 +682,7 @@ bool Account::apichangePass( |* Voucher & Payments ********************************************| \*****************************************************************/ Targoman::API::AAA::stuVoucher Account::processVoucher( -// intfAPICallBoom &_APICALLBOOM, +// intfAPICallBoom &APICALLBOOM_PARAM, quint64 _userID, quint64 _voucherID ) { @@ -780,7 +780,7 @@ Targoman::API::AAA::stuVoucher Account::processVoucher( } void Account::tryCancelVoucher( -// intfAPICallBoom &_APICALLBOOM, +// intfAPICallBoom &APICALLBOOM_PARAM, quint64 _userID, quint64 _voucherID, bool _setAsError @@ -870,7 +870,7 @@ void Account::tryCancelVoucher( ///TODO: select gateway (null|single|multiple) from service ///TODO: check for common gateway voucher Targoman::API::AAA::stuVoucher Account::apiPOSTfinalizeBasket( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, Targoman::API::AAA::stuPreVoucher _preVoucher, Targoman::API::AccountModule::enuPaymentGatewayType::Type _gatewayType, QString _domain, @@ -976,7 +976,7 @@ Targoman::API::AAA::stuVoucher Account::apiPOSTfinalizeBasket( * @return */ Targoman::API::AAA::stuVoucher Account::apiPOSTapproveOnlinePayment( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, // Targoman::API::AccountModule::enuPaymentGatewayType::Type _gatewayType, const QString _paymentMD5, const QString _domain, @@ -1007,7 +1007,7 @@ Targoman::API::AAA::stuVoucher Account::apiPOSTapproveOnlinePayment( ///TODO: implement auto verify daemon OJO on failed payments in the daemon Targoman::API::AAA::stuVoucher Account::apiPOSTapproveOfflinePayment( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, quint64 _vchID, const QString& _bank, const QString& _receiptCode, @@ -1074,7 +1074,7 @@ Targoman::API::AAA::stuVoucher Account::apiPOSTapproveOfflinePayment( } bool Account::apiPOSTaddPrizeTo( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, quint64 _targetUsrID, quint64 _amount, TAPI::JSON_t _desc @@ -1099,7 +1099,7 @@ bool Account::apiPOSTaddPrizeTo( } bool Account::apiPOSTaddIncomeTo( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, quint64 _targetUsrID, quint64 _amount, TAPI::JSON_t _desc @@ -1124,7 +1124,7 @@ bool Account::apiPOSTaddIncomeTo( } bool Account::apiPOSTcheckVoucherTTL( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, quint64 _voucherID ) { } @@ -1134,7 +1134,7 @@ bool Account::apiPOSTcheckVoucherTTL( \****************************************************************/ #ifdef QT_DEBUG QVariant Account::apiPOSTfixtureSetup( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, QString _random ) { QVariantMap Result; @@ -1364,7 +1364,7 @@ QVariant Account::apiPOSTfixtureSetup( } QVariant Account::apiPOSTfixtureCleanup( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, QString _random ) { QVariantMap Result; @@ -1568,7 +1568,7 @@ QVariant Account::apiPOSTfixtureCleanup( ///TODO: not tested bool Account::apiPOSTfixtureApproveEmail( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, QString _email ) { clsDAC DAC; @@ -1608,7 +1608,7 @@ bool Account::apiPOSTfixtureApproveEmail( ///TODO: not tested bool Account::apiPOSTfixtureApproveMobile( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, TAPI::Mobile_t _mobile ) { clsDAC DAC; diff --git a/Modules/Account/moduleSrc/Account.h b/Modules/Account/moduleSrc/Account.h index 8af94f9f..48902301 100644 --- a/Modules/Account/moduleSrc/Account.h +++ b/Modules/Account/moduleSrc/Account.h @@ -58,12 +58,12 @@ class Account : public intfSQLBasedWithActionLogsModule public: static Targoman::API::AAA::stuVoucher processVoucher( -// intfAPICallBoom &_APICALLBOOM, +// intfAPICallBoom &APICALLBOOM_PARAM, quint64 _userID, quint64 _voucherID ); static void tryCancelVoucher( -// intfAPICallBoom &_APICALLBOOM, +// intfAPICallBoom &APICALLBOOM_PARAM, quint64 _userID, quint64 _voucherID, bool _setAsError = false @@ -80,7 +80,7 @@ private slots: QString REST_GET_OR_POST( normalizePhoneNumber, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, QString _phone, QString _country ), @@ -90,7 +90,7 @@ private slots: QVariantMap REST_PUT( signup, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, QString _emailOrMobile, TAPI::MD5_t _pass, QString _role = "BaseUser", @@ -106,7 +106,7 @@ private slots: QVariantMap REST_PUT( signupByMobileOnly, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, TAPI::Mobile_t _mobile, QString _role = "BaseUser", QString _name = "", @@ -123,7 +123,7 @@ private slots: TAPI::EncodedJWT_t REST_POST( approveEmail, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, QString _email, TAPI::MD5_t _uuid, bool _autoLogin = false, @@ -138,7 +138,7 @@ private slots: TAPI::EncodedJWT_t REST_POST( approveMobile, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, TAPI::Mobile_t _mobile, quint32 _code, bool _autoLogin = false, @@ -153,7 +153,7 @@ private slots: TAPI::EncodedJWT_t REST_GET_OR_POST( login, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, QString _emailOrMobile, TAPI::MD5_t _pass, QString _salt, @@ -169,7 +169,7 @@ private slots: bool REST_GET_OR_POST( loginByMobileOnly, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, TAPI::Mobile_t _mobile, bool _signupIfNotExists = false, QString _signupRole = "BaseUser" @@ -190,7 +190,7 @@ private slots: bool REST_GET_OR_POST( resendApprovalCode, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, QString _emailOrMobile ), "Recreate (if expired) approval code and resend last valid code to the email or mobile." @@ -199,7 +199,7 @@ private slots: // bool REST_PUT( // requestMobileVerifyCode, // ( -// APICallBoom &_APICALLBOOM, +// APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, // TAPI::Mobile_t _mobile // ), // "Send verification code for provided mobile." @@ -208,7 +208,7 @@ private slots: // TAPI::EncodedJWT_t REST_PUT( // verifyLoginByMobileCode, // ( -// APICallBoom &_APICALLBOOM, +// APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, // TAPI::Mobile_t _mobile, // quint32 _code, // TAPI::CommaSeparatedStringList_t _services = {}, @@ -222,7 +222,7 @@ private slots: TAPI::EncodedJWT_t REST_GET_OR_POST( loginByOAuth, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, TAPI::enuOAuthType::Type _type, QString _oAuthToken, TAPI::CommaSeparatedStringList_t _services, @@ -235,7 +235,7 @@ private slots: // Targoman::API::AccountModule::stuMultiJWT REST_GET_OR_POST( // refreshJWT, // ( -// APICallBoom &_APICALLBOOM, +// APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, // TAPI::JWT_t _loginJWT, // QString _services = {} // ), @@ -245,7 +245,7 @@ private slots: bool REST_GET_OR_POST( logout, ( - APICallBoom &_APICALLBOOM + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM ), "Logout logged in user" ) @@ -253,7 +253,7 @@ private slots: QString REST_GET_OR_POST( createForgotPasswordLink, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, QString _emailOrMobile ), "Create a forgot password request returning a UUID for the requiest" @@ -263,7 +263,7 @@ private slots: QString REST_POST( fixtureGetLastForgotPasswordUUIDAndMakeAsSent, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, QString _emailOrMobile ), "fixture: Get Last Forgot Password UUID And Make As Sent" @@ -273,7 +273,7 @@ private slots: bool REST_GET_OR_POST( changePassByUUID, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, QString _emailOrMobile, TAPI::MD5_t _uuid, TAPI::MD5_t _newPass @@ -284,7 +284,7 @@ private slots: bool REST_GET_OR_POST( changePass, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, TAPI::MD5_t _oldPass, QString _oldPassSalt, TAPI::MD5_t _newPass @@ -298,7 +298,7 @@ private slots: Targoman::API::AAA::stuVoucher REST_POST( finalizeBasket, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, Targoman::API::AAA::stuPreVoucher _preVoucher, Targoman::API::AccountModule::enuPaymentGatewayType::Type _gatewayType, QString _domain, @@ -314,7 +314,7 @@ private slots: Targoman::API::AAA::stuVoucher REST_POST( approveOnlinePayment, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, // Targoman::API::AccountModule::enuPaymentGatewayType::Type _gatewayType, const QString _paymentMD5, const QString _domain, @@ -326,7 +326,7 @@ private slots: Targoman::API::AAA::stuVoucher REST_POST( approveOfflinePayment, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, quint64 _vchID, const QString& _bank, const QString& _receiptCode, @@ -343,7 +343,7 @@ private slots: bool REST_POST( addPrizeTo, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, quint64 _targetUsrID, quint64 _amount, TAPI::JSON_t _desc @@ -355,7 +355,7 @@ private slots: bool REST_POST( addIncomeTo, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, quint64 _targetUsrID, quint64 _amount, TAPI::JSON_t _desc @@ -367,7 +367,7 @@ private slots: bool REST_POST( checkVoucherTTL, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, quint64 _voucherID ), "Check voucher and items for ttl" @@ -377,7 +377,7 @@ private slots: QVariant REST_POST( fixtureSetup, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, QString _random = {} ), "Create sample data. give random=1 to auto generate random number" @@ -386,7 +386,7 @@ private slots: QVariant REST_POST( fixtureCleanup, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, QString _random = {} ), "Cleanup sample data" @@ -394,7 +394,7 @@ private slots: bool REST_POST( fixtureApproveEmail, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, QString _email ), "Approve Email Address directly" @@ -402,7 +402,7 @@ private slots: bool REST_POST( fixtureApproveMobile, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, TAPI::Mobile_t _mobile ), "Approve Mobile directly" diff --git a/Modules/Account/moduleSrc/ORM/ApprovalRequest.cpp b/Modules/Account/moduleSrc/ORM/ApprovalRequest.cpp index fd0c6b1e..d7ca1aa3 100644 --- a/Modules/Account/moduleSrc/ORM/ApprovalRequest.cpp +++ b/Modules/Account/moduleSrc/ORM/ApprovalRequest.cpp @@ -102,7 +102,7 @@ bool ApprovalRequest::apiDELETE(DELETE_METHOD_ARGS_IMPL_APICALL) { } QVariant ApprovalRequest::apitimerInfo( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, QString _emailOrMobile ) { Authorization::validateIPAddress(_APICALLBOOM.getIP()); diff --git a/Modules/Account/moduleSrc/ORM/ApprovalRequest.h b/Modules/Account/moduleSrc/ORM/ApprovalRequest.h index bfdf1ac4..065f7a37 100644 --- a/Modules/Account/moduleSrc/ORM/ApprovalRequest.h +++ b/Modules/Account/moduleSrc/ORM/ApprovalRequest.h @@ -81,7 +81,7 @@ private slots: QVariant REST_GET_OR_POST( timerInfo, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, QString _emailOrMobile ), "Returns TTL remained for Approval Request based on email or mobile" diff --git a/Modules/Account/moduleSrc/ORM/Auth.cpp b/Modules/Account/moduleSrc/ORM/Auth.cpp index 3881fd3f..072c8d01 100644 --- a/Modules/Account/moduleSrc/ORM/Auth.cpp +++ b/Modules/Account/moduleSrc/ORM/Auth.cpp @@ -28,13 +28,12 @@ namespace Targoman::API::AccountModule::ORM { Auth::Auth() : intfPureModule( "Account" - ) { ; } + ) +{ ; } bool Auth::apivalidateJWT( - APICallBoom &_APICALLBOOM + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM ) { - Q_UNUSED(_APICALLBOOM); - return true; } diff --git a/Modules/Account/moduleSrc/ORM/Auth.h b/Modules/Account/moduleSrc/ORM/Auth.h index fa2279d8..0e757e75 100644 --- a/Modules/Account/moduleSrc/ORM/Auth.h +++ b/Modules/Account/moduleSrc/ORM/Auth.h @@ -42,7 +42,7 @@ private slots: bool REST_GET_OR_POST( validateJWT, ( - APICallBoom &_APICALLBOOM + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM ), "Check JWT" ) diff --git a/Modules/Account/moduleSrc/ORM/User.cpp b/Modules/Account/moduleSrc/ORM/User.cpp index 5c3671e6..1e0cabcf 100644 --- a/Modules/Account/moduleSrc/ORM/User.cpp +++ b/Modules/Account/moduleSrc/ORM/User.cpp @@ -178,7 +178,7 @@ SelectQuery User::getPhotoQuery(quint64 _usrID) { } TAPI::Base64Image_t User::apiGETphoto( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, quint64 _usrID ) { quint64 CurrentUserID = _APICALLBOOM.getUserID(); @@ -196,7 +196,7 @@ TAPI::Base64Image_t User::apiGETphoto( } bool User::apiUPDATEphoto( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, TAPI::Base64Image_t _image ) { quint64 CurrentUserID = _APICALLBOOM.getUserID(); @@ -229,7 +229,7 @@ bool User::apiUPDATEphoto( } bool User::apiPOSTdeletePhoto( - APICallBoom &_APICALLBOOM + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM ) { quint64 CurrentUserID = _APICALLBOOM.getUserID(); @@ -257,7 +257,7 @@ bool User::apiPOSTdeletePhoto( } bool User::apiUPDATEemail( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, TAPI::Email_t _email, TAPI::MD5_t _psw, QString _salt @@ -289,7 +289,7 @@ bool User::apiUPDATEemail( } bool User::apiUPDATEmobile( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, TAPI::Mobile_t _mobile, TAPI::MD5_t _psw, QString _salt @@ -321,7 +321,7 @@ bool User::apiUPDATEmobile( } bool User::apiUPDATEpersonalInfo( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, QString _name, QString _family, TAPI::ISO639_2_t _language, @@ -347,7 +347,7 @@ bool User::apiUPDATEpersonalInfo( } bool User::apiUPDATEfinancialInfo( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, TAPI::Sheba_t _iban, TAPI::Ether_t _ether ) { @@ -391,7 +391,7 @@ bool User::apiUPDATEfinancialInfo( } bool User::apiUPDATEextraInfo( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, NULLABLE_TYPE(TAPI::Date_t) _birthDate, QString _job, QString _education, @@ -539,7 +539,7 @@ UserExtraInfo::UserExtraInfo() : ) { ; } -//bool UserExtraInfo::apiUPDATEsheba(APICallBoom &_APICALLBOOM, TAPI::Sheba_t _sheba) +//bool UserExtraInfo::apiUPDATEsheba(APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, TAPI::Sheba_t _sheba) //{ // clsDACResult Result = UserExtraInfo::instance().execQuery( // "UPDATE " + this->Name @@ -553,7 +553,7 @@ UserExtraInfo::UserExtraInfo() : // return Result.numRowsAffected() > 0; //} -//bool UserExtraInfo::apiUPDATEetherAddress(APICallBoom &_APICALLBOOM, TAPI::Ether_t _etherAddress) +//bool UserExtraInfo::apiUPDATEetherAddress(APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, TAPI::Ether_t _etherAddress) //{ // clsDACResult Result = UserExtraInfo::instance().execQuery( // "UPDATE " + this->Name diff --git a/Modules/Account/moduleSrc/ORM/User.h b/Modules/Account/moduleSrc/ORM/User.h index 027a3abd..d88d674f 100644 --- a/Modules/Account/moduleSrc/ORM/User.h +++ b/Modules/Account/moduleSrc/ORM/User.h @@ -53,7 +53,7 @@ private slots: TAPI::Base64Image_t REST_GET( photo, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, quint64 _usrID ), "Get user photo as base64" @@ -61,7 +61,7 @@ private slots: bool REST_UPDATE( photo, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, TAPI::Base64Image_t _image ), "Updates user image based using a base64 encoded image" @@ -69,7 +69,7 @@ private slots: bool REST_POST( deletePhoto, ( - APICallBoom &_APICALLBOOM + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM ), "Delete user image" ) @@ -77,7 +77,7 @@ private slots: bool REST_UPDATE( email, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, TAPI::Email_t _email, TAPI::MD5_t _psw, QString _salt @@ -88,7 +88,7 @@ private slots: bool REST_UPDATE( mobile, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, TAPI::Mobile_t _mobile, TAPI::MD5_t _pass, QString _salt @@ -99,7 +99,7 @@ private slots: bool REST_UPDATE( personalInfo, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, QString _name = {}, QString _family = {}, TAPI::ISO639_2_t _language = {}, @@ -111,7 +111,7 @@ private slots: bool REST_UPDATE( financialInfo, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, TAPI::Sheba_t _iban = {}, TAPI::Ether_t _ether = {} ), @@ -121,7 +121,7 @@ private slots: bool REST_UPDATE( extraInfo, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, NULLABLE_TYPE(TAPI::Date_t) _birthDate = NULLABLE_NULL_VALUE, QString _job = {}, QString _education = {}, @@ -177,7 +177,7 @@ private slots: // bool REST_UPDATE( // birthDate, // ( -// APICallBoom &_APICALLBOOM, +// APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, // QString _birthDate // ), // "Updates users birth date" @@ -186,7 +186,7 @@ private slots: // bool REST_UPDATE( // photo, // ( -// APICallBoom &_APICALLBOOM, +// APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, // TAPI::Base64Image_t _image // ), // "Updates user image based using a base64 encoded image" @@ -195,7 +195,7 @@ private slots: // bool REST_UPDATE( // sheba, // ( -// APICallBoom &_APICALLBOOM, +// APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, // TAPI::Sheba_t _sheba // ), // "Updates user Sheba address" @@ -204,7 +204,7 @@ private slots: // bool REST_UPDATE( // etherAddress, // ( -// APICallBoom &_APICALLBOOM, +// APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, // TAPI::Ether_t _etherAddress // ), // "Updates user ethercoin address" diff --git a/Modules/Account/moduleSrc/ORM/UserWallets.cpp b/Modules/Account/moduleSrc/ORM/UserWallets.cpp index a0d7babb..8c146dc2 100644 --- a/Modules/Account/moduleSrc/ORM/UserWallets.cpp +++ b/Modules/Account/moduleSrc/ORM/UserWallets.cpp @@ -106,7 +106,7 @@ bool UserWallets::apiDELETE(DELETE_METHOD_ARGS_IMPL_APICALL) { //bool UserWallets::apiUPDATEdefaultWallet( bool UserWallets::apiUPDATEsetAsDefault( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, quint64 _walID ) { bool IsPrivileged = Authorization::hasPriv(_APICALLBOOM.getJWT(), this->privOn(EHTTP_PATCH, this->moduleBaseName())); @@ -147,7 +147,7 @@ bool UserWallets::apiUPDATEsetAsDefault( } bool UserWallets::apiCREATEtransfer( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, const QString& _destLogin, quint32 _amount, const TAPI::MD5_t& _pass, diff --git a/Modules/Account/moduleSrc/ORM/UserWallets.h b/Modules/Account/moduleSrc/ORM/UserWallets.h index 15327aff..3df7830b 100644 --- a/Modules/Account/moduleSrc/ORM/UserWallets.h +++ b/Modules/Account/moduleSrc/ORM/UserWallets.h @@ -76,7 +76,7 @@ private slots: bool REST_UPDATE( setAsDefault, //defaultWallet, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, quint64 _walID ), "change default wallet" @@ -85,7 +85,7 @@ private slots: bool REST_CREATE( transfer, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, const QString& _destLogin, quint32 _amount, const TAPI::MD5_t& _pass, diff --git a/Modules/Account/moduleSrc/ORM/Voucher.cpp b/Modules/Account/moduleSrc/ORM/Voucher.cpp index 80a37d6d..d9cba0bc 100644 --- a/Modules/Account/moduleSrc/ORM/Voucher.cpp +++ b/Modules/Account/moduleSrc/ORM/Voucher.cpp @@ -72,7 +72,7 @@ bool Voucher::apiDELETE(DELETE_METHOD_ARGS_IMPL_APICALL) { } Targoman::API::AAA::stuVoucher Voucher::apiCREATErequestIncrease( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, quint32 _amount, Targoman::API::AccountModule::enuPaymentGatewayType::Type _gatewayType, QString _domain, @@ -126,7 +126,7 @@ Targoman::API::AAA::stuVoucher Voucher::apiCREATErequestIncrease( return Voucher; } -quint64 Voucher::apiCREATErequestWithdraw(APICallBoom &_APICALLBOOM, quint64 _amount, quint64 _walID, const QString& _desc) { +quint64 Voucher::apiCREATErequestWithdraw(APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, quint64 _amount, quint64 _walID, const QString& _desc) { return this->callSP("spWithdrawal_Request", { {"iWalletID",_walID}, {"iForUsrID", _APICALLBOOM.getUserID()}, @@ -136,7 +136,7 @@ quint64 Voucher::apiCREATErequestWithdraw(APICallBoom &_APICALLBOOM, quint }).spDirectOutputs().value("oVoucherID").toULongLong(); } -quint64 Voucher::apiCREATErequestWithdrawFor(APICallBoom &_APICALLBOOM, quint64 _targetUsrID, quint64 _amount, TAPI::JSON_t _desc) { +quint64 Voucher::apiCREATErequestWithdrawFor(APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, quint64 _targetUsrID, quint64 _amount, TAPI::JSON_t _desc) { Authorization::checkPriv(_APICALLBOOM.getJWT(), {"AAA:RequestWithdraw"}); return this->callSP("spWithdrawal_Request", { diff --git a/Modules/Account/moduleSrc/ORM/Voucher.h b/Modules/Account/moduleSrc/ORM/Voucher.h index 1f908f1c..f5ae2acc 100644 --- a/Modules/Account/moduleSrc/ORM/Voucher.h +++ b/Modules/Account/moduleSrc/ORM/Voucher.h @@ -71,7 +71,7 @@ private slots: Targoman::API::AAA::stuVoucher REST_CREATE( requestIncrease, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, quint32 _amount, Targoman::API::AccountModule::enuPaymentGatewayType::Type _gatewayType, QString _domain, @@ -87,7 +87,7 @@ private slots: quint64 REST_CREATE( requestWithdraw, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, quint64 _amount, quint64 _walID, const QString& _desc = {} @@ -98,7 +98,7 @@ private slots: quint64 REST_CREATE( requestWithdrawFor, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, quint64 _targetUsrID, quint64 _amount, TAPI::JSON_t _desc diff --git a/Modules/Advert/moduleSrc/Advert.cpp b/Modules/Advert/moduleSrc/Advert.cpp index 21b9196e..110ee012 100644 --- a/Modules/Advert/moduleSrc/Advert.cpp +++ b/Modules/Advert/moduleSrc/Advert.cpp @@ -124,7 +124,7 @@ bool Advert::isEmpty(const UsageLimits_t& _limits) const } void Advert::applyAssetAdditives( - intfAPICallBoom &_APICALLBOOM, + intfAPICallBoom &APICALLBOOM_PARAM, INOUT stuAssetItem& _assetItem, const OrderAdditives_t& _orderAdditives ) { @@ -135,7 +135,7 @@ void Advert::applyAssetAdditives( /***************************************************************************************************/ //bool Advert::apiPOSTprocessVoucher( -// APICallBoom &_APICALLBOOM, +// APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, // Targoman::API::AAA::stuVoucherItem _voucherItem // ) //{ @@ -149,7 +149,7 @@ void Advert::applyAssetAdditives( //} //bool Advert::apiPOSTcancelVoucher( -// APICallBoom &_APICALLBOOM, +// APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, // Targoman::API::AAA::stuVoucherItem _voucherItem // ) //{ @@ -163,14 +163,14 @@ void Advert::applyAssetAdditives( //} Targoman::API::AdvertModule::stuAdvert Advert::apiGETnewBanner( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, QString _location, Targoman::API::AdvertModule::enuAdvertOrder::Type _order ) { } Targoman::API::AdvertModule::stuAdvert Advert::apiGETnewText( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, QString _location, Targoman::API::AdvertModule::enuAdvertOrder::Type _order, const QString _keywords @@ -178,7 +178,7 @@ Targoman::API::AdvertModule::stuAdvert Advert::apiGETnewText( } QString Advert::apiGETretrieveURL( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, quint64 _id, TAPI::IPv4_t _clientIP, QString _agent @@ -190,7 +190,7 @@ QString Advert::apiGETretrieveURL( \****************************************************************/ #ifdef QT_DEBUG QVariant Advert::apiPOSTfixtureSetup( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, QString _random ) { QVariantMap Result; @@ -416,13 +416,13 @@ QVariant Advert::apiPOSTfixtureSetup( } //bool Advert::apiPOSTfixtureSetupVoucher( -// APICallBoom &_APICALLBOOM +// APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM // ) //{ //} QVariant Advert::apiPOSTfixtureCleanup( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, QString _random ) { QVariantMap Result; diff --git a/Modules/Advert/moduleSrc/Advert.h b/Modules/Advert/moduleSrc/Advert.h index 39fdf877..272df607 100644 --- a/Modules/Advert/moduleSrc/Advert.h +++ b/Modules/Advert/moduleSrc/Advert.h @@ -82,7 +82,7 @@ class Advert : public intfAccountingBasedModule virtual bool isUnlimited(const UsageLimits_t& _limits) const; virtual bool isEmpty(const UsageLimits_t& _limits) const; virtual void applyAssetAdditives( - intfAPICallBoom &_APICALLBOOM, + intfAPICallBoom &APICALLBOOM_PARAM, INOUT stuAssetItem& _assetItem, const OrderAdditives_t& _orderAdditives ); @@ -91,7 +91,7 @@ protected slots: // bool REST_POST( // processVoucher, // ( -// APICallBoom &_APICALLBOOM, +// APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, // Targoman::API::AAA::stuVoucherItem _voucherItem // ), // "Process voucher item" @@ -100,7 +100,7 @@ protected slots: // bool REST_POST( // cancelVoucher, // ( -// APICallBoom &_APICALLBOOM, +// APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, // Targoman::API::AAA::stuVoucherItem _voucherItem // ), // "Cancel voucher item" @@ -109,7 +109,7 @@ protected slots: Targoman::API::AdvertModule::stuAdvert REST_GET( newBanner, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, QString _location, Targoman::API::AdvertModule::enuAdvertOrder::Type _order ), @@ -119,7 +119,7 @@ protected slots: Targoman::API::AdvertModule::stuAdvert REST_GET( newText, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, QString _location, Targoman::API::AdvertModule::enuAdvertOrder::Type _order, QString _keywords @@ -130,7 +130,7 @@ protected slots: QString REST_GET( retrieveURL, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, quint64 _id, TAPI::IPv4_t _clientIP, QString _agent @@ -143,7 +143,7 @@ protected slots: QVariant REST_POST( fixtureSetup, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, QString _random = {} ), "Create sample data. give random=1 to auto generate random number" @@ -152,7 +152,7 @@ protected slots: QVariant REST_POST( fixtureCleanup, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, QString _random = {} ), "Cleanup sample data" @@ -160,7 +160,7 @@ protected slots: // bool REST_POST( // fixtureSetupVoucher, // ( -// APICallBoom &_APICALLBOOM +// APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM // ), // "Sets up basket and voucher" // ) diff --git a/Modules/FormalityChecker/FormalityChecker.cpp b/Modules/FormalityChecker/FormalityChecker.cpp index b2d3fd73..9dc1924d 100644 --- a/Modules/FormalityChecker/FormalityChecker.cpp +++ b/Modules/FormalityChecker/FormalityChecker.cpp @@ -41,7 +41,7 @@ bool FormalityChecker::init() { } QString FormalityChecker::apicheck( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, const QString _text, const TAPI::ISO639_2_t& _lang ) { diff --git a/Modules/FormalityChecker/FormalityChecker.h b/Modules/FormalityChecker/FormalityChecker.h index 4959d1e7..9e4a42e4 100644 --- a/Modules/FormalityChecker/FormalityChecker.h +++ b/Modules/FormalityChecker/FormalityChecker.h @@ -46,7 +46,7 @@ private slots: QString REST_GET_OR_POST( check, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, const QString _text, const TAPI::ISO639_2_t& _lang ), diff --git a/Modules/TextProcessor/TextProcessor.cpp b/Modules/TextProcessor/TextProcessor.cpp index 6826adbd..46802e9a 100644 --- a/Modules/TextProcessor/TextProcessor.cpp +++ b/Modules/TextProcessor/TextProcessor.cpp @@ -46,7 +46,7 @@ bool TextProcessor::init() { } QString TextProcessor::apinormalize( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, const QString _text, const TAPI::ISO639_2_t& _lang, bool _useSpellCorrector @@ -55,7 +55,7 @@ QString TextProcessor::apinormalize( } QString TextProcessor::apitext2IXML( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, const QString& _text, const TAPI::ISO639_2_t& _lang, bool _useSpellCorrector @@ -78,7 +78,7 @@ QString TextProcessor::apitext2IXML( } QString TextProcessor::apiixml2Text( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, const QString& _ixml, bool _detokenize, bool _hinidiDigits, @@ -89,7 +89,7 @@ QString TextProcessor::apiixml2Text( } QString TextProcessor::apitokenize( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, const QString& _text, const TAPI::ISO639_2_t& _lang, bool _useSpellCorrector, diff --git a/Modules/TextProcessor/TextProcessor.h b/Modules/TextProcessor/TextProcessor.h index 2ee65d50..1bab1feb 100644 --- a/Modules/TextProcessor/TextProcessor.h +++ b/Modules/TextProcessor/TextProcessor.h @@ -42,7 +42,7 @@ private slots: QString REST_GET_OR_POST( normalize, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, const QString _text, const TAPI::ISO639_2_t& _lang, bool _useSpellCorrector = true @@ -53,7 +53,7 @@ private slots: QString REST_GET_OR_POST( text2IXML, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, const QString& _text, const TAPI::ISO639_2_t& _lang, bool _useSpellCorrector = true @@ -64,7 +64,7 @@ private slots: QString REST_GET_OR_POST( ixml2Text, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, const QString& _ixml, bool _detokenize = true, bool _hinidiDigits = false, @@ -77,7 +77,7 @@ private slots: QString REST_GET_OR_POST( tokenize, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, const QString& _text, const TAPI::ISO639_2_t& _lang, bool _useSpellCorrector = true, diff --git a/Modules/Ticketing/moduleSrc/ORM/Tickets.cpp b/Modules/Ticketing/moduleSrc/ORM/Tickets.cpp index 23152bc0..0c0c0d03 100644 --- a/Modules/Ticketing/moduleSrc/ORM/Tickets.cpp +++ b/Modules/Ticketing/moduleSrc/ORM/Tickets.cpp @@ -97,7 +97,7 @@ Tickets::Tickets() : QVariant Tickets::apiGET( // GET_METHOD_ARGS_IMPL_APICALL, - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, TAPI::PKsByPath_t _pksByPath, quint64 _pageIndex, quint16 _pageSize, diff --git a/Modules/Ticketing/moduleSrc/ORM/Tickets.h b/Modules/Ticketing/moduleSrc/ORM/Tickets.h index 53eecb55..3831cd78 100644 --- a/Modules/Ticketing/moduleSrc/ORM/Tickets.h +++ b/Modules/Ticketing/moduleSrc/ORM/Tickets.h @@ -81,7 +81,7 @@ private slots: , ( // GET_METHOD_ARGS_HEADER_APICALL, - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, TAPI::PKsByPath_t _pksByPath = {}, quint64 _pageIndex = 0, quint16 _pageSize = 20, diff --git a/Modules/Ticketing/moduleSrc/Ticketing.cpp b/Modules/Ticketing/moduleSrc/Ticketing.cpp index e44fc7b4..d8288c6e 100644 --- a/Modules/Ticketing/moduleSrc/Ticketing.cpp +++ b/Modules/Ticketing/moduleSrc/Ticketing.cpp @@ -129,7 +129,7 @@ quint64 Ticketing::insertTicket( } QVariantMap Ticketing::apiPUTnewMessage( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, const QString &_title, const QString &_body, quint32 _serviceID, @@ -161,7 +161,7 @@ QVariantMap Ticketing::apiPUTnewMessage( } QVariantMap Ticketing::apiPUTnewFeedback( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, const QString &_title, const QString &_body, Targoman::API::TicketingModule::enuTicketType::Type _ticketType, @@ -203,7 +203,7 @@ QVariantMap Ticketing::apiPUTnewFeedback( \****************************************************************/ #ifdef QT_DEBUG QVariant Ticketing::apiPOSTfixtureSetup( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, QString _random ) { QVariantMap Result; @@ -277,7 +277,7 @@ QVariant Ticketing::apiPOSTfixtureSetup( } QVariant Ticketing::apiPOSTfixtureCleanup( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_IMPL &APICALLBOOM_PARAM, QString _random ) { QVariantMap Result; diff --git a/Modules/Ticketing/moduleSrc/Ticketing.h b/Modules/Ticketing/moduleSrc/Ticketing.h index 2ef6d364..613782c8 100644 --- a/Modules/Ticketing/moduleSrc/Ticketing.h +++ b/Modules/Ticketing/moduleSrc/Ticketing.h @@ -63,7 +63,7 @@ private slots: QVariantMap REST_PUT( newMessage, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, const QString &_title, const QString &_body, quint32 _serviceID, @@ -77,7 +77,7 @@ private slots: QVariantMap REST_PUT( newFeedback, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, const QString &_title, const QString &_body, Targoman::API::TicketingModule::enuTicketType::Type _ticketType, @@ -93,7 +93,7 @@ protected slots: QVariant REST_POST( fixtureSetup, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, QString _random = {} ), "Create sample data. give random=1 to auto generate random number" @@ -102,7 +102,7 @@ protected slots: QVariant REST_POST( fixtureCleanup, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_JWT_DECL &APICALLBOOM_PARAM, QString _random = {} ), "Cleanup sample data" diff --git a/Modules/URLProcessor/URLProcessor.cpp b/Modules/URLProcessor/URLProcessor.cpp index b081ef50..cb858fb5 100644 --- a/Modules/URLProcessor/URLProcessor.cpp +++ b/Modules/URLProcessor/URLProcessor.cpp @@ -34,7 +34,7 @@ URLProcessor::URLProcessor() : intfPureModule("URLProcessor") { ; } QString URLProcessor::apiGETcanonicalize( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, const QString _url, bool _removeWWW ) { @@ -44,7 +44,7 @@ QString URLProcessor::apiGETcanonicalize( } QString URLProcessor::apiGETconvertHexCodes( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_IMPL &APICALLBOOM_PARAM, const QString _url, bool _convertAll ) { diff --git a/Modules/URLProcessor/URLProcessor.h b/Modules/URLProcessor/URLProcessor.h index f4bb1af8..c8e85100 100644 --- a/Modules/URLProcessor/URLProcessor.h +++ b/Modules/URLProcessor/URLProcessor.h @@ -39,7 +39,7 @@ private slots: QString REST_GET( canonicalize, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, const QString _url, bool _removeWWW = true ), @@ -49,7 +49,7 @@ private slots: QString REST_GET( convertHexCodes, ( - APICallBoom &_APICALLBOOM, + APICALLBOOM_TYPE_NO_JWT_DECL &APICALLBOOM_PARAM, const QString _url, bool _convertAll = false ),