Add enable/disable incoming email domain config

This commit is contained in:
Johannes Zellner
2025-03-10 21:06:33 +01:00
parent 7bec653b55
commit 72635c8711
8 changed files with 184 additions and 17 deletions
+11
View File
@@ -17,6 +17,17 @@ function create() {
if (error || result.status !== 200) return [error || result];
return [null, result.body.domains];
},
async get(domain) {
let error, result;
try {
result = await fetcher.get(`${API_ORIGIN}/api/v1/domains/${domain}`, { access_token: accessToken });
} catch (e) {
error = e;
}
if (error || result.status !== 200) return [error || result];
return [null, result.body];
},
async add(domain, zoneName, provider, config, fallbackCertificate, tlsConfig) {
const data = { domain, provider, config, tlsConfig };
if (zoneName) data.zoneName = zoneName;