0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Updated comped flag for v3 Members Admin API

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

Since we no longer have the concept the "comped" we update the v3 API to
always have a `comped` flag of `false` - maintaining backwards
compatibility.
This commit is contained in:
Fabien O'Carroll 2021-05-17 12:16:07 +01:00
parent 57a176ff3d
commit 278ad8eaea

View file

@ -78,17 +78,6 @@ function serializeMember(member, options) {
stripe = {
subscriptions: json.subscriptions
};
const hasCompedSubscription = !!json.subscriptions.find(
/**
* @param {SerializedMemberStripeSubscription} sub
*/
function (sub) {
return sub.plan.nickname === 'Complimentary' && sub.status === 'active';
}
);
if (hasCompedSubscription) {
comped = true;
}
}
return {