mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Refactored members csv export for bettere readability
no issue
This commit is contained in:
parent
357671549a
commit
895b3d98e7
1 changed files with 14 additions and 3 deletions
|
@ -47,9 +47,20 @@ module.exports = {
|
|||
exportCSV(models, apiConfig, frame) {
|
||||
debug('exportCSV');
|
||||
|
||||
const fields = ['id', 'email', 'name', 'note', 'subscribed_to_emails', 'complimentary_plan', 'stripe_customer_id', 'created_at', 'deleted_at', 'labels'];
|
||||
const fields = [
|
||||
'id',
|
||||
'email',
|
||||
'name',
|
||||
'note',
|
||||
'subscribed_to_emails',
|
||||
'complimentary_plan',
|
||||
'stripe_customer_id',
|
||||
'created_at',
|
||||
'deleted_at',
|
||||
'labels'
|
||||
];
|
||||
|
||||
models.members = models.members.map((member) => {
|
||||
const members = models.members.map((member) => {
|
||||
member = mapper.mapMember(member, frame);
|
||||
let stripeCustomerId;
|
||||
|
||||
|
@ -75,7 +86,7 @@ module.exports = {
|
|||
};
|
||||
});
|
||||
|
||||
frame.response = formatCSV(models.members, fields);
|
||||
frame.response = formatCSV(members, fields);
|
||||
},
|
||||
|
||||
importCSV(data, apiConfig, frame) {
|
||||
|
|
Loading…
Add table
Reference in a new issue