setDnsRecords API has changed
This commit is contained in:
@@ -2175,7 +2175,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
if (error) return callback(error);
|
||||
if (status !== 204) return callback(new ClientError(status, data));
|
||||
|
||||
that.setDnsRecords(domain, callback); // this is done so that an out-of-sync dkim key can be synced
|
||||
that.setDnsRecords({ domain: domain, type: 'mail' }, callback); // this is done so that an out-of-sync dkim key can be synced
|
||||
});
|
||||
};
|
||||
|
||||
@@ -2376,12 +2376,12 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.setDnsRecords = function (domain, callback) {
|
||||
post('/api/v1/mail/' + domain + '/dns', {}, null, function (error, data, status) {
|
||||
Client.prototype.setDnsRecords = function (options, callback) {
|
||||
post('/api/v1/cloudron/sync_dns', options, null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 201) return callback(new ClientError(status, data));
|
||||
|
||||
callback(null);
|
||||
callback(null, data.taskId);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user