get/set solr config

This commit is contained in:
Girish Ramakrishnan
2020-11-19 17:45:16 -08:00
parent cac8659fbd
commit 3125e1b386
5 changed files with 340 additions and 8 deletions

View File

@@ -2240,6 +2240,25 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.getSolrConfig = function (callback) {
var config = {};
get('/api/v1/mailserver/solr_config', config, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data);
});
};
Client.prototype.setSolrConfig = function (enabled, callback) {
post('/api/v1/mailserver/solr_config', { enabled: enabled }, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null);
});
};
Client.prototype.getSpamAcl = function (callback) {
var config = {};