mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-08 02:52:39 -05:00
Changed members CSV export to match import format
refs c295435b41
- The import format changed the `subscribed` to `subscribed_to_emails`. Export should have the same format as import for consistency
This commit is contained in:
parent
c863d215fb
commit
68a36dd799
2 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ module.exports = {
|
|||
exportCSV(models, apiConfig, frame) {
|
||||
debug('exportCSV');
|
||||
|
||||
const fields = ['id', 'email', 'name', 'note', 'subscribed', 'complimentary_plan', 'stripe_customer_id', 'created_at', 'deleted_at'];
|
||||
const fields = ['id', 'email', 'name', 'note', 'subscribed_to_emails', 'complimentary_plan', 'stripe_customer_id', 'created_at', 'deleted_at'];
|
||||
|
||||
models.members = models.members.map((member) => {
|
||||
member = mapper.mapMember(member);
|
||||
|
@ -62,7 +62,7 @@ module.exports = {
|
|||
email: member.email,
|
||||
name: member.name,
|
||||
note: member.note,
|
||||
subscribed: member.subscribed,
|
||||
subscribed_to_emails: member.subscribed,
|
||||
complimentary_plan: member.comped,
|
||||
stripe_customer_id: stripeCustomerId,
|
||||
created_at: member.created_at,
|
||||
|
|
|
@ -276,7 +276,7 @@ describe('Members API', function () {
|
|||
.then((res) => {
|
||||
should.not.exist(res.headers['x-cache-invalidate']);
|
||||
res.headers['content-disposition'].should.match(/Attachment;\sfilename="members/);
|
||||
res.text.should.match(/id,email,name,note,subscribed,complimentary_plan,stripe_customer_id,created_at,deleted_at/);
|
||||
res.text.should.match(/id,email,name,note,subscribed_to_emails,complimentary_plan,stripe_customer_id,created_at,deleted_at/);
|
||||
res.text.should.match(/member1@test.com/);
|
||||
res.text.should.match(/Mr Egg/);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue