Also send data with the domain deletion

This commit is contained in:
Johannes Zellner
2015-09-13 18:10:45 +02:00
parent a94267fc98
commit ebe975f463
+6
View File
@@ -50,9 +50,15 @@ function delSubdomain(zoneName, subdomain, type, value, callback) {
debug('delSubdomain: %s for domain %s.', subdomain, zoneName);
var data = {
type: type,
value: value
};
superagent
.del(config.apiServerOrigin() + '/api/v1/domains/' + config.appFqdn(subdomain))
.query({ token: config.token() })
.send(data)
.end(function (error, result) {
if (error) return callback(error);
if (result.status !== 204) return callback(new SubdomainError(SubdomainError.EXTERNAL_ERROR, util.format('%s %j', result.status, result.body)));