Fixed faker.random.number rename warnings

no issue

- `faker.random.number` is now `faker.datatype.number`
This commit is contained in:
Kevin Ansfield 2021-04-12 15:32:39 +01:00
parent 40c6cb51e6
commit 59a37dc984

View File

@ -8,7 +8,7 @@ export function mockMembersStats(server) {
server.get('/members/stats/count', function (db, {queryParams}) {
let {days} = queryParams;
let firstSubscriberDays = faker.random.number({min: 30, max: 600});
let firstSubscriberDays = faker.datatype.number({min: 30, max: 600});
if (days === 'all-time') {
days = firstSubscriberDays;
@ -18,7 +18,7 @@ export function mockMembersStats(server) {
let total = 0;
if (firstSubscriberDays > days) {
total += faker.random.number({max: 1000});
total += faker.datatype.number({max: 1000});
}
// simulate sql GROUP BY where days with 0 subscribers are missing
@ -26,7 +26,7 @@ export function mockMembersStats(server) {
let i = 0;
while (i < days) {
let date = moment().subtract(i, 'days').format('YYYY-MM-DD');
let count = faker.random.number({min: 0, max: 30});
let count = faker.datatype.number({min: 0, max: 30});
if (count !== 0) {
dateCounts[date] = count;