Skip to content

Commit

Permalink
Merge pull request #589 from ever-co/feature/ban-improvements
Browse files Browse the repository at this point in the history
feat(ever-admin): generate all in fake data now generates banned users
  • Loading branch information
evereq committed Jun 5, 2019
2 parents 752fdc5 + a2d4688 commit 5ab565f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/api/src/services/users/UsersService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ export class UsersService extends DBService<User>
const firstName = faker.name.firstName();
const lastName = faker.name.lastName();
const email = faker.internet.email(firstName, lastName);
const isBanned = Math.random() < 0.02;

const geoLocation: IGeoLocationCreateObject = {
countryId: faker.random.number(Country.ZW) as Country,
Expand All @@ -475,6 +476,7 @@ export class UsersService extends DBService<User>
geoLocation,
apartment: `${customerCount}`,
email,
isBanned,
image: faker.image.avatar(),
phone: faker.phone.phoneNumber(),
_createdAt: faker.date.between(
Expand Down

0 comments on commit 5ab565f

Please sign in to comment.