0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-25 02:31:59 -05:00

Included products when exporting member csv

refs https://github.com/TryGhost/Team/issues/765

Since Members can be given complimentary access to one of many products,
we must include which products a member has access to when exporting
from Ghost. This will allow us to reimport without losing information.
This commit is contained in:
Fabien O'Carroll 2021-06-23 10:18:15 +01:00
parent ccd917ff8c
commit 1de88f7397

View file

@ -448,6 +448,9 @@ module.exports = {
validation: {},
async query(frame) {
frame.options.withRelated = ['labels', 'stripeSubscriptions', 'stripeSubscriptions.customer'];
if (labsService.isSet('multipleProducts')) {
frame.options.withRelated.push('products');
}
const page = await membersService.api.members.list(frame.options);
return page;