Add pre-flight check for domain collision

This commit is contained in:
Johannes Zellner
2019-09-20 01:55:45 +02:00
parent 9672f7e3da
commit 4fd1e55ae8
3 changed files with 83 additions and 15 deletions

View File

@@ -1721,6 +1721,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.getDNSRecords = function (domain, subdomain, type, callback) {
get('/api/v1/domains/' + domain + '/dns?subdomain=' + subdomain + '&type=' + type, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.values);
});
};
Client.prototype.addMailDomain = function (domain, callback) {
post('/api/v1/mail', { domain: domain }, null, function (error, data, status) {
if (error) return callback(error);