Ghost/ghost/admin/mirage/factories/newsletter.js
Sag e6254bbb93
🎨 Removed member bulk deletion safeguard from safe queries (#20747)
fixes https://linear.app/tryghost/issue/ENG-1484

- in Ghost release
[v5.89.0](https://github.com/TryGhost/Ghost/releases/tag/v5.89.0), we
have added a safeguard around bulk member deletion, due to a limitation
in NQL for member filters (commit: 2484a77)
- with this change, we limit the safeguard to only the cases we know are
problematic, and remove it for other useful and safe queries
- more precisely, the safeguard is in place only when:
    - Multiple newsletters exist, and the filter contains 2 or more
newsletter filters
    - If any of the following stripe filters are used even once:
        - Billing period
        - Stripe subscription status
        - Paid start date
        - Next billing date
        - Subscription started on post/page
        - Offers
2024-08-14 15:48:54 +00:00

11 lines
341 B
JavaScript

import moment from 'moment-timezone';
import {Factory} from 'miragejs';
export default Factory.extend({
name(i) { return `Newsletter ${i}`; },
slug(i) { return `newsletter-${i}`; },
status() { return 'active'; },
createdAt() { return moment.utc().toISOString(); },
updatedAt() { return moment.utc().toISOString(); }
});