mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-17 14:19:16 +00:00
fix: Implement better domain id check on DNS restoration
This commit is contained in:
parent
370cbf1052
commit
f55800cd72
|
@ -190,7 +190,16 @@ class ServerInstallationRepository {
|
|||
),
|
||||
);
|
||||
|
||||
final String? domainId = await dnsProviderApi.getZoneId(domain);
|
||||
/// TODO: nvm it's because only Cloudflare uses Zone
|
||||
/// for other providers we need to implement a different kind of
|
||||
/// functionality here... but it's on refactoring, let it be here for now.
|
||||
final APIGenericResult<bool> apiResponse =
|
||||
await dnsProviderApi.isApiTokenValid(token);
|
||||
|
||||
String? domainId;
|
||||
if (apiResponse.success && apiResponse.data) {
|
||||
domainId = await dnsProviderApi.getZoneId(domain);
|
||||
}
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue