mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-23 09:16:54 +00:00
feat: Implement domain list getter for digital ocean dns
This commit is contained in:
parent
a45b93cd27
commit
fc4f78162b
|
@ -238,16 +238,13 @@ class DigitalOceanDnsApi extends DnsProviderApi {
|
|||
|
||||
@override
|
||||
Future<List<String>> domainList() async {
|
||||
final String url = '$rootAddress/zones';
|
||||
final String url = '$rootAddress/domains';
|
||||
List<String> domains = [];
|
||||
|
||||
final Dio client = await getClient();
|
||||
try {
|
||||
final Response response = await client.get(
|
||||
url,
|
||||
queryParameters: {'per_page': 50},
|
||||
);
|
||||
domains = response.data['result']
|
||||
final Response response = await client.get(url);
|
||||
domains = response.data['domains']
|
||||
.map<String>((final el) => el['name'] as String)
|
||||
.toList();
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in a new issue