Fixed issue where all only a few subscribers where exported via CSV. (#7925)

closes #7850

- export subscribers to CSV now uses .findAll() instead of .findPage()
This commit is contained in:
Vivek Kannan 2017-02-08 16:07:09 +05:30 committed by Katharina Irrgang
parent e6662b6929
commit 4718d55630

View File

@ -239,8 +239,8 @@ subscribers = {
// Export data, otherwise send error 500
function exportSubscribers() {
return dataProvider.Subscriber.findPage(options).then(function (data) {
return formatCSV(data.subscribers);
return dataProvider.Subscriber.findAll(options).then(function (data) {
return formatCSV(data.toJSON(options));
}).catch(function (err) {
return Promise.reject(new errors.GhostError({err: err}));
});