Function
mapUser
(u: {
id: string
name: string
email: string
role?: string | null
banned?: boolean | null
banReason?: string | null
})
Source from the content-addressed store, hash-verified
| 27 | } |
| 28 | |
| 29 | function mapUser(u: { |
| 30 | id: string |
| 31 | name: string |
| 32 | email: string |
| 33 | role?: string | null |
| 34 | banned?: boolean | null |
| 35 | banReason?: string | null |
| 36 | }): AdminUser { |
| 37 | return { |
| 38 | id: u.id, |
| 39 | name: u.name || '', |
| 40 | email: u.email, |
| 41 | role: u.role ?? 'user', |
| 42 | banned: u.banned ?? false, |
| 43 | banReason: u.banReason ?? null, |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | async function fetchAdminUsers( |
| 48 | offset: number, |
Tested by
no test coverage detected