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
6 changes: 3 additions & 3 deletions App/Server/StaticModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ TAPI::RawData_t IMPL_REST_GET_OR_POST(StaticModule, openAPI_json, (

return TAPI::RawData_t(
QJsonDocument(OpenAPIGenerator::retrieveJson(
_APICALLBOOM.host(),
_APICALLBOOM.port()
APICALLBOOM_PARAM.host(),
APICALLBOOM_PARAM.port()
)).toJson(QJsonDocument::Compact),
"application/json; charset=utf-8"
);
Expand All @@ -62,7 +62,7 @@ QVariant IMPL_REST_GET_OR_POST(StaticModule, swaggerui, (
if (ServerConfigs::SwaggerUI.value().isEmpty())
throw exHTTPNotFound("Swagger is not configured");

QString API = _APICALLBOOM.requestAPIPath();
QString API = APICALLBOOM_PARAM.requestAPIPath();

QString File = API.mid(sizeof("/swaggerUI") - 1).replace(QRegularExpression("//+"), "/");

Expand Down
20 changes: 10 additions & 10 deletions App/Server/clsAPIObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ intfAPIArgManipulator* clsAPIObject::argSpecs(quint8 _paramIndex) const {
}

QVariant clsAPIObject::invoke(
INTFAPICALLBOOM_IMPL *_APICALLBOOM,
INTFAPICALLBOOM_IMPL *APICALLBOOM_PARAM,
bool _isUpdateMethod,
const QStringList& _args,
// /*OUT*/ QVariantMap &_responseHeaders,
Expand Down Expand Up @@ -250,7 +250,7 @@ QVariant clsAPIObject::invoke(
gServerStats.APIInternalCacheStats[this->BaseMethod.name()].inc();

QVariantMap Map = CachedValue.toMap();
_APICALLBOOM->setResponseHeaders(Map.value("headers").toMap());
APICALLBOOM_PARAM->setResponseHeaders(Map.value("headers").toMap());
return Map.value("result");
}
}
Expand All @@ -261,7 +261,7 @@ QVariant clsAPIObject::invoke(
gServerStats.APICentralCacheStats[this->BaseMethod.name()].inc();

QVariantMap Map = CachedValue.toMap();
_APICALLBOOM->setResponseHeaders(Map.value("headers").toMap());
APICALLBOOM_PARAM->setResponseHeaders(Map.value("headers").toMap());
return Map.value("result");
}
}
Expand All @@ -282,14 +282,14 @@ QVariant clsAPIObject::invoke(

QVariant Result = APIMethod->invokeMethod(
this,
_APICALLBOOM,
APICALLBOOM_PARAM,
Arguments
// _responseHeaders
);

QVariantMap ResultWithHeader = QVariantMap({
{ "result", Result },
{ "headers", _APICALLBOOM->getResponseHeaders() },
{ "headers", APICALLBOOM_PARAM->getResponseHeaders() },
});
if (this->Cache4Secs != 0)
InternalCache::setValue(CacheKey, ResultWithHeader, this->Cache4Secs);
Expand All @@ -302,7 +302,7 @@ QVariant clsAPIObject::invoke(
}

void clsAPIObject::invokeMethod(
INTFAPICALLBOOM_IMPL *_APICALLBOOM,
INTFAPICALLBOOM_IMPL *APICALLBOOM_PARAM,
const QVariantList& _arguments,
QGenericReturnArgument _returnArg
// /*OUT*/ QVariantMap &_responseHeaders
Expand Down Expand Up @@ -343,7 +343,7 @@ void clsAPIObject::invokeMethod(
};

try {
QGenericArgument _APICALLBOOM_ARG("_APICALLBOOM", _APICALLBOOM);
QGenericArgument _APICALLBOOM_ARG("APICALLBOOM_PARAM", APICALLBOOM_PARAM);

QGenericArgument Arguments[9];

Expand All @@ -361,7 +361,7 @@ void clsAPIObject::invokeMethod(
parent,
this->IsAsync ? Qt::QueuedConnection : Qt::DirectConnection,
_returnArg,
_APICALLBOOM_ARG, //Q_ARG(intfAPICallBoom, *_APICALLBOOM),
_APICALLBOOM_ARG, //Q_ARG(intfAPICallBoom, *APICALLBOOM_PARAM),
Arguments[0],
Arguments[1],
Arguments[2],
Expand Down Expand Up @@ -399,12 +399,12 @@ bool clsAPIObject::isPolymorphic(const QMetaMethodExtended& _method) {
}

void clsAPIObject::updateDefaultValues(const QMetaMethodExtended& _method) {
///-1: for _APICALLBOOM
///-1: for APICALLBOOM_PARAM
if ((_method.parameterNames().size() - 1) < this->RequiredParamsCount) {
this->RequiredParamsCount = static_cast<quint8>(_method.parameterNames().size() - 1);

QMetaMethodExtended Method = _method;
Method.DefaultValues.removeAt(0); //for _APICALLBOOM
Method.DefaultValues.removeAt(0); //for APICALLBOOM_PARAM
this->LessArgumentMethods.append(Method);
}
}
Expand Down
4 changes: 2 additions & 2 deletions App/Server/clsAPIObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class clsAPIObject : public intfAPIObject, public QObject
}

QVariant invoke(
INTFAPICALLBOOM_DECL *_APICALLBOOM,
INTFAPICALLBOOM_DECL *APICALLBOOM_PARAM,
bool _isUpdateMethod,
const QStringList& _args,
// /*OUT*/ QVariantMap &_responseHeaders,
Expand All @@ -130,7 +130,7 @@ class clsAPIObject : public intfAPIObject, public QObject
) const;

void invokeMethod(
INTFAPICALLBOOM_DECL *_APICALLBOOM,
INTFAPICALLBOOM_DECL *APICALLBOOM_PARAM,
const QVariantList& _arguments,
QGenericReturnArgument _returnArg
// /*OUT*/ QVariantMap &_responseHeaders
Expand Down
Loading