mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-08 00:51:20 +00:00
fix: Add a workaround for the case when we don't have sreverTypeId
This commit is contained in:
parent
c3752673f7
commit
3b1e71d771
|
@ -76,21 +76,44 @@ class ServerInstallationRepository {
|
||||||
|
|
||||||
if (box.get(BNames.hasFinalChecked, defaultValue: false)) {
|
if (box.get(BNames.hasFinalChecked, defaultValue: false)) {
|
||||||
TlsOptions.verifyCertificate = true;
|
TlsOptions.verifyCertificate = true;
|
||||||
return ServerInstallationFinished(
|
if (serverTypeIdentificator == null && serverDetails != null) {
|
||||||
installationDialoguePopUp: null,
|
final finalServerType = await ProvidersController.currentServerProvider!
|
||||||
providerApiToken: providerApiToken!,
|
.getServerType(serverDetails.id);
|
||||||
serverTypeIdentificator: serverTypeIdentificator!,
|
await saveServerType(finalServerType.data!);
|
||||||
dnsApiToken: dnsApiToken!,
|
await ProvidersController.currentServerProvider!
|
||||||
serverDomain: serverDomain!,
|
.trySetServerLocation(finalServerType.data!.location.identifier);
|
||||||
backblazeCredential: backblazeCredential!,
|
return ServerInstallationFinished(
|
||||||
serverDetails: serverDetails!,
|
installationDialoguePopUp: null,
|
||||||
rootUser: box.get(BNames.rootUser),
|
providerApiToken: providerApiToken!,
|
||||||
isServerStarted: box.get(BNames.isServerStarted, defaultValue: false),
|
serverTypeIdentificator: finalServerType.data!.identifier,
|
||||||
isServerResetedFirstTime:
|
dnsApiToken: dnsApiToken!,
|
||||||
box.get(BNames.isServerResetedFirstTime, defaultValue: false),
|
serverDomain: serverDomain!,
|
||||||
isServerResetedSecondTime:
|
backblazeCredential: backblazeCredential!,
|
||||||
box.get(BNames.isServerResetedSecondTime, defaultValue: false),
|
serverDetails: serverDetails,
|
||||||
);
|
rootUser: box.get(BNames.rootUser),
|
||||||
|
isServerStarted: box.get(BNames.isServerStarted, defaultValue: false),
|
||||||
|
isServerResetedFirstTime:
|
||||||
|
box.get(BNames.isServerResetedFirstTime, defaultValue: false),
|
||||||
|
isServerResetedSecondTime:
|
||||||
|
box.get(BNames.isServerResetedSecondTime, defaultValue: false),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return ServerInstallationFinished(
|
||||||
|
installationDialoguePopUp: null,
|
||||||
|
providerApiToken: providerApiToken!,
|
||||||
|
serverTypeIdentificator: serverTypeIdentificator!,
|
||||||
|
dnsApiToken: dnsApiToken!,
|
||||||
|
serverDomain: serverDomain!,
|
||||||
|
backblazeCredential: backblazeCredential!,
|
||||||
|
serverDetails: serverDetails!,
|
||||||
|
rootUser: box.get(BNames.rootUser),
|
||||||
|
isServerStarted: box.get(BNames.isServerStarted, defaultValue: false),
|
||||||
|
isServerResetedFirstTime:
|
||||||
|
box.get(BNames.isServerResetedFirstTime, defaultValue: false),
|
||||||
|
isServerResetedSecondTime:
|
||||||
|
box.get(BNames.isServerResetedSecondTime, defaultValue: false),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (box.get(BNames.isRecoveringServer, defaultValue: false) &&
|
if (box.get(BNames.isRecoveringServer, defaultValue: false) &&
|
||||||
|
|
Loading…
Reference in a new issue