Add enable/disable incoming email domain config
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user