Adjust to new dns_check api

This commit is contained in:
Johannes Zellner
2019-09-23 23:46:55 +02:00
parent 9ed2fa734a
commit 9555f3c853

View File

@@ -1730,13 +1730,12 @@ 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) {
Client.prototype.getDNSRecords = function (domain, subdomain, callback) {
get('/api/v1/domains/' + domain + '/check_dns?subdomain=' + subdomain, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
if (data.error) return callback(new ClientError(status, data.error));
callback(null, data.values);
callback(null, data);
});
};