chore: fixed native config post processing

This commit is contained in:
vladimir.kuznetsov 2025-02-21 14:15:23 +07:00
parent 48980c486e
commit 8afe50cd87
2 changed files with 6 additions and 2 deletions

View file

@ -87,6 +87,7 @@ bool ApiConfigsController::exportNativeConfig(const QString &serverCountryCode,
QJsonObject jsonConfig = QJsonDocument::fromJson(responseBody).object();
QString nativeConfig = jsonConfig.value(configKey::config).toString();
nativeConfig.replace("$WIREGUARD_CLIENT_PRIVATE_KEY", apiPayloadData.wireGuardClientPrivKey);
SystemController::saveFile(fileName, nativeConfig);
return true;
@ -124,6 +125,8 @@ void ApiConfigsController::prepareVpnKeyExport()
auto vpnKey = apiConfigObject.value(apiDefs::key::vpnKey).toString();
vpnKey.replace("vpn://", "");
m_qrCodes = qrCodeUtils::generateQrCodeImageSeries(vpnKey.toUtf8());
emit vpnKeyExportReady();