feature: retrieving support info from gateway (#1483)
* feature: retrieving support info from gateway * feature: added "external-premium" service-type * chore: fixed external premium visability
This commit is contained in:
parent
68db721089
commit
7fd71a8408
8 changed files with 67 additions and 21 deletions
|
@ -310,7 +310,7 @@ bool ApiConfigsController::deactivateDevice()
|
|||
auto serverConfigObject = m_serversModel->getServerConfig(serverIndex);
|
||||
auto apiConfigObject = serverConfigObject.value(configKey::apiConfig).toObject();
|
||||
|
||||
if (apiUtils::getConfigType(serverConfigObject) != apiDefs::ConfigType::AmneziaPremiumV2) {
|
||||
if (!apiUtils::isPremiumServer(serverConfigObject)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -345,7 +345,7 @@ bool ApiConfigsController::deactivateExternalDevice(const QString &uuid, const Q
|
|||
auto serverConfigObject = m_serversModel->getServerConfig(serverIndex);
|
||||
auto apiConfigObject = serverConfigObject.value(configKey::apiConfig).toObject();
|
||||
|
||||
if (apiUtils::getConfigType(serverConfigObject) != apiDefs::ConfigType::AmneziaPremiumV2) {
|
||||
if (!apiUtils::isPremiumServer(serverConfigObject)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ bool ApiSettingsController::getAccountInfo(bool reload)
|
|||
|
||||
QByteArray responseBody;
|
||||
|
||||
if (apiUtils::getConfigType(serverConfig) == apiDefs::ConfigType::AmneziaPremiumV2) {
|
||||
if (apiUtils::isPremiumServer(serverConfig)) {
|
||||
ErrorCode errorCode = gatewayController.post(QString("%1v1/account_info"), apiPayload, responseBody);
|
||||
if (errorCode != ErrorCode::NoError) {
|
||||
emit errorOccurred(errorCode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue