Fix mailbox export

can also export as csv now
This commit is contained in:
Girish Ramakrishnan
2022-02-17 16:37:48 -08:00
parent 8258a8c777
commit 2d27a92587
4 changed files with 42 additions and 17 deletions

View File

@@ -258,7 +258,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
return;
}
var file = new Blob([ content ], { type: 'application/json' });
var file = new Blob([ content ], { type: type === 'json' ? 'application/json' : 'text/csv' });
var a = document.createElement('a');
a.href = URL.createObjectURL(file);
a.download = type === 'json' ? 'users.json' : 'users.csv';