Add param to overwrite DNS
This commit is contained in:
@@ -1145,7 +1145,11 @@ function setLocation(appId, data, auditSource, callback) {
|
||||
error = domains.validateHostname(values.location, domainObject);
|
||||
if (error) return callback(new AppsError(AppsError.BAD_FIELD, 'Bad location: ' + error.message, { field: 'location' }));
|
||||
|
||||
scheduleTask(appId, { oldConfig: getAppConfig(app) }, values, function (error, result) {
|
||||
const args = {
|
||||
oldConfig: _.pick(app, 'location', 'domain', 'fqdn', 'alternateDomains', 'portBindings'),
|
||||
overwriteDns: !!data.overwriteDns
|
||||
};
|
||||
scheduleTask(appId, args, values, function (error, result) {
|
||||
if (error && error.reason === AppsError.ALREADY_EXISTS) error = getDuplicateErrorDetails(error.message, values.location, domainObject, data.portBindings, app.alternateDomains);
|
||||
if (error) return callback(error);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user