Fix return code for email toggle to let the UI correctly react
This commit is contained in:
@@ -1206,8 +1206,8 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
|
||||
|
||||
Client.prototype.enableMailForDomain = function (domain, enabled, callback) {
|
||||
post('/api/v1/mail/' + domain + '/enable', { enabled: enabled }).success(function (data, status) {
|
||||
if (status !== 202 || typeof data !== 'object') return callback(new ClientError(status, data));
|
||||
callback(null, data);
|
||||
if (status !== 202) return callback(new ClientError(status, data));
|
||||
callback(null);
|
||||
}).error(defaultErrorHandler(callback));
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user