Merge branch 'master' into dto

This commit is contained in:
NaiJi 2023-09-05 08:48:18 -03:00
commit 4694080e28
2 changed files with 20 additions and 16 deletions

View File

@ -155,7 +155,7 @@ class ServerInstallationRepository {
RecoveryStep _getCurrentRecoveryStep( RecoveryStep _getCurrentRecoveryStep(
final String? serverProviderToken, final String? serverProviderToken,
final String? cloudflareToken, final String? dnsProviderToken,
final ServerDomain serverDomain, final ServerDomain serverDomain,
final ServerHostingDetails? serverDetails, final ServerHostingDetails? serverDetails,
) { ) {
@ -218,24 +218,28 @@ class ServerInstallationRepository {
final Map<String, bool> skippedMatches, final Map<String, bool> skippedMatches,
) async { ) async {
final Map<String, bool> matches = <String, bool>{}; final Map<String, bool> matches = <String, bool>{};
await InternetAddress.lookup(domainName!).then( try {
(final records) { await InternetAddress.lookup(domainName!).then(
for (final record in records) { (final records) {
if (skippedMatches[record.host] ?? false) { for (final record in records) {
matches[record.host] = true; if (skippedMatches[record.host] ?? false) {
continue; matches[record.host] = true;
continue;
}
if (record.address == ip4!) {
matches[record.host] = true;
}
} }
if (record.address == ip4!) { },
matches[record.host] = true; );
} } catch (e) {
} print(e);
}, }
);
return matches; return matches;
} }
Future<void> createDkimRecord(final ServerDomain cloudFlareDomain) async { Future<void> createDkimRecord(final ServerDomain domain) async {
final ServerApi api = ServerApi(); final ServerApi api = ServerApi();
late DnsRecord record; late DnsRecord record;
@ -248,7 +252,7 @@ class ServerInstallationRepository {
await ProvidersController.currentDnsProvider!.setDnsRecord( await ProvidersController.currentDnsProvider!.setDnsRecord(
record, record,
cloudFlareDomain, domain,
); );
} }

View File

@ -99,7 +99,7 @@ class InitializingPage extends StatelessWidget {
steps: const [ steps: const [
'Hosting', 'Hosting',
'Server Type', 'Server Type',
'CloudFlare', 'DNS Provider',
'Backblaze', 'Backblaze',
'Domain', 'Domain',
'User', 'User',