mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 04:43:12 +03:00
Fixed members CSV export not filtering on subscribed (#14721)
refs https://ghost.slack.com/archives/C02G9E68C/p1651851268912299?thread_ts=1651848216.832419&cid=C02G9E68C - When exporting members to CSV the subscribed filter was not working correctly - Fixed by also applying the NQL mapping to the export endpoint - This also changes the order of the members in the CSV export to match the order in admin/browse endpoint
This commit is contained in:
parent
7d951f96f0
commit
96e7187e8d
@ -47,6 +47,12 @@ module.exports = {
|
||||
this.browse(...arguments);
|
||||
},
|
||||
|
||||
exportCSV() {
|
||||
debug('exportCSV');
|
||||
|
||||
this.browse(...arguments);
|
||||
},
|
||||
|
||||
add(apiConfig, frame) {
|
||||
debug('add');
|
||||
if (frame.data.members[0].labels) {
|
||||
|
@ -1543,7 +1543,7 @@ describe('Members API', function () {
|
||||
|
||||
it('Can export CSV', async function () {
|
||||
const res = await agent
|
||||
.get(`/members/upload/`)
|
||||
.get(`/members/upload/?limit=all`)
|
||||
.expectStatus(200)
|
||||
.expectEmptyBody() // express-test body parsing doesn't support CSV
|
||||
.matchHeaderSnapshot({
|
||||
|
Loading…
Reference in New Issue
Block a user