test email now requires a domain

This commit is contained in:
Girish Ramakrishnan
2018-01-23 16:10:09 -08:00
parent 6edad6b986
commit e4b253da22
3 changed files with 9 additions and 4 deletions

View File

@@ -1125,12 +1125,12 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.sentTestMail = function (email, callback) {
Client.prototype.sendTestMail = function (domain, to, callback) {
var data = {
email: email
to: to
};
post('/api/v1/cloudron/send_test_mail', data).success(function(data, status) {
post('/api/v1/cloudron/' + domain + '/send_test_mail', data).success(function(data, status) {
if (status !== 202) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));