919ec733e7
refs https://linear.app/tryghost/issue/IPC-92/add-logic-for-completing-steps - added `onboarding` service to manage logic and state for the onboarding display and it's various steps - added basic "display onboarding checklist" state to replicate the basic feature flag toggle along with making sure it's only shown to owners - added acceptance test file and missing mirage endpoints needed for the dashboard to load without error
74 lines
1.9 KiB
JavaScript
74 lines
1.9 KiB
JavaScript
export default function mockStats(server) {
|
|
server.get('/stats/subscriptions/', function () {
|
|
return {
|
|
stats: [],
|
|
meta: {
|
|
cadences: [],
|
|
tiers: [],
|
|
totals: []
|
|
}
|
|
};
|
|
});
|
|
|
|
server.get('/stats/member_count/', function () {
|
|
return {
|
|
stats: [
|
|
{
|
|
date: '2022-04-18',
|
|
paid: 0,
|
|
free: 2,
|
|
comped: 0,
|
|
paid_subscribed: 0,
|
|
paid_canceled: 0
|
|
},
|
|
{
|
|
date: '2022-04-19',
|
|
paid: 0,
|
|
free: 2,
|
|
comped: 0,
|
|
paid_subscribed: 2,
|
|
paid_canceled: 0
|
|
},
|
|
{
|
|
date: '2022-04-28',
|
|
paid: 0,
|
|
free: 12,
|
|
comped: 0,
|
|
paid_subscribed: 0,
|
|
paid_canceled: 0
|
|
},
|
|
{
|
|
date: '2022-05-02',
|
|
paid: 0,
|
|
free: 35,
|
|
comped: 0,
|
|
paid_subscribed: 0,
|
|
paid_canceled: 0
|
|
},
|
|
{
|
|
date: '2022-05-10',
|
|
paid: 0,
|
|
free: 38,
|
|
comped: 1,
|
|
paid_subscribed: 0,
|
|
paid_canceled: 0
|
|
}
|
|
],
|
|
meta: {
|
|
totals: {
|
|
paid: 0,
|
|
free: 38,
|
|
comped: 1
|
|
}
|
|
}
|
|
};
|
|
});
|
|
|
|
server.get('/stats/referrers/', function () {
|
|
return {
|
|
stats: [],
|
|
meta: {}
|
|
};
|
|
});
|
|
}
|