fix: revert API country selection on server switch failure

This commit is contained in:
cd-amn
2026-05-22 16:12:54 +04:00
parent 0b51ff281a
commit 43290bbf99
5 changed files with 33 additions and 1 deletions
@@ -484,6 +484,12 @@ ErrorCode SubscriptionController::updateServiceFromGateway(const QString &server
return ErrorCode::NoError;
}
void SubscriptionController::restoreApiV2Config(const QString &serverId, const ApiV2ServerConfig &config)
{
const QJsonObject json = config.toJson();
m_serversRepository->editServer(serverId, json, serverConfigUtils::configTypeFromJson(json));
}
ErrorCode SubscriptionController::deactivateDevice(const QString &serverId)
{
auto apiV2 = m_serversRepository->apiV2Config(serverId);