mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
6af2706f10
no-issue * Removed support for paid param from v3 & canary API * Updated active subscription checks to use status flag * Updated MEGA to use status filter over paid flag * Removed support for paid option at model level * Installed @tryghost/members-api@1.0.0-rc.0 * Updated members fixtures
15 lines
493 B
JavaScript
15 lines
493 B
JavaScript
module.exports.formattedMemberResponse = function formattedMemberResponse(member) {
|
|
if (!member) {
|
|
return null;
|
|
}
|
|
return {
|
|
uuid: member.uuid,
|
|
email: member.email,
|
|
name: member.name,
|
|
firstname: member.name && member.name.split(' ')[0],
|
|
avatar_image: member.avatar_image,
|
|
subscribed: !!member.subscribed,
|
|
subscriptions: member.stripe ? member.stripe.subscriptions : [],
|
|
paid: member.status === 'paid'
|
|
};
|
|
};
|