reinit repo with sources from zipped dir
This commit is contained in:
15
apps/admin/src/api/fetchUsers.ts
Normal file
15
apps/admin/src/api/fetchUsers.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import {faker} from '@faker-js/faker'
|
||||
import { User } from '../types'
|
||||
|
||||
|
||||
const waitMs = (ms: number) => new Promise(resolve => setTimeout(resolve, ms))
|
||||
|
||||
export const fetchUsers = async (): Promise<User[]> => {
|
||||
await waitMs(30)
|
||||
return Array.from({length: 2000}).map(() => ({
|
||||
uuid: faker.string.uuid(),
|
||||
name: faker.person.fullName(),
|
||||
email: faker.internet.email(),
|
||||
job: faker.person.jobTitle(),
|
||||
}))
|
||||
}
|
||||
Reference in New Issue
Block a user