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:
parent
57a176ff3d
commit
278ad8eaea
1 changed files with 0 additions and 11 deletions
|
@ -78,17 +78,6 @@ function serializeMember(member, options) {
|
||||||
stripe = {
|
stripe = {
|
||||||
subscriptions: json.subscriptions
|
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 {
|
return {
|
||||||
|
|
Loading…
Add table
Reference in a new issue