myems/admin/app/services/fdd/emailmessageanalysis.servic...

25 lines
809 B
Python

'use strict';
app.factory('EmailMessageAnalysisService', function($http) {
return {
getAnalysisResult: function(query, headers, callback) {
$http.get(getAPI()+"emailmessages", { params: {startdatetime: query.startdatetime, enddatetime: query.enddatetime}} , {headers})
.then(function (response) {
callback(response);
}, function (response) {
callback(response);
});
},
deleteEmailMessage: function(emailmessage, headers, callback) {
$http.delete(getAPI()+'emailmessages/'+emailmessage.id, {headers})
.then(function (response) {
callback(response);
}, function (response) {
callback(response);
});
}
};
});