mailboxes: be explicit about what is exported
This commit is contained in:
@@ -449,7 +449,18 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
return console.error('Failed to list mailboxes.', error);
|
||||
}
|
||||
|
||||
var file = new Blob([ JSON.stringify(result, null, 2) ], { type: 'application/json' });
|
||||
var content = JSON.stringify(result.map(function (mailbox) {
|
||||
return {
|
||||
name: mailbox.name,
|
||||
domain: mailbox.domain,
|
||||
ownerId: mailbox.ownerId,
|
||||
ownerType: mailbox.ownerType,
|
||||
active: mailbox.ative,
|
||||
aliases: mailbox.aliases
|
||||
};
|
||||
}), null, 2);
|
||||
|
||||
var file = new Blob([ content ], { type: 'application/json' });
|
||||
var a = document.createElement('a');
|
||||
a.href = URL.createObjectURL(file);
|
||||
a.download = $scope.domain.domain.replaceAll('.','_') + '-mailboxes.json';
|
||||
|
||||
Reference in New Issue
Block a user