Fix mail server location UI

This commit is contained in:
Girish Ramakrishnan
2020-08-20 23:06:22 -07:00
parent f6fef21bf7
commit eb69c365fc
3 changed files with 94 additions and 22 deletions
+19
View File
@@ -2094,6 +2094,25 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.getMailLocation = function (callback) {
var config = {};
get('/api/v1/mailserver/location', config, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data); // { subdomain, domain }
});
};
Client.prototype.setMailLocation = function (subdomain, domain, callback) {
post('/api/v1/mailserver/location', { subdomain: subdomain, domain: domain }, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 202) return callback(new ClientError(status, data));
callback(null, { taskId: data.taskId });
});
};
Client.prototype.getMaxEmailSize = function (callback) {
var config = {};