mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 13:52:10 +03:00
Moved the last_seen_at api property behind a flag
refs https://github.com/TryGhost/Team/issues/1393 - Prevents any issue from reaching all Ghost users
This commit is contained in:
parent
3bd8e01495
commit
ebab652919
@ -1,6 +1,7 @@
|
||||
//@ts-check
|
||||
const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:members');
|
||||
const {unparse} = require('@tryghost/members-csv');
|
||||
const labs = require('../../../../../../shared/labs');
|
||||
|
||||
module.exports = {
|
||||
hasActiveStripeSubscriptions: createSerializer('hasActiveStripeSubscriptions', passthrough),
|
||||
@ -124,10 +125,13 @@ function serializeMember(member, options) {
|
||||
email_opened_count: json.email_opened_count,
|
||||
email_open_rate: json.email_open_rate,
|
||||
email_recipients: json.email_recipients,
|
||||
last_seen_at: json.last_seen_at,
|
||||
status: json.status
|
||||
};
|
||||
|
||||
if (labs.isSet('membersLastSeenFilter')) {
|
||||
serialized.last_seen_at = json.last_seen_at;
|
||||
}
|
||||
|
||||
if (json.products) {
|
||||
serialized.products = json.products;
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ describe('Members API without Stripe', function () {
|
||||
});
|
||||
|
||||
beforeEach(function () {
|
||||
mockManager.mockLabsEnabled('membersLastSeenFilter');
|
||||
mockManager.mockMail();
|
||||
});
|
||||
|
||||
@ -90,6 +91,7 @@ describe('Members API', function () {
|
||||
|
||||
beforeEach(function () {
|
||||
mockManager.mockLabsEnabled('multipleProducts');
|
||||
mockManager.mockLabsEnabled('membersLastSeenFilter');
|
||||
mockManager.mockStripe();
|
||||
mockManager.mockMail();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user