✨ first version
This commit is contained in:
+5
-1
@@ -11,5 +11,9 @@ export const listStaffMembers = createServerFn({ method: 'GET' }).handler(async
|
||||
query: { sortBy: 'createdAt', sortDirection: 'asc', limit: 100 },
|
||||
})
|
||||
|
||||
return users
|
||||
// `listUsers`'s return type doesn't pick up `user.additionalFields` from the
|
||||
// auth config the way the actual response body does — `phone` is present at
|
||||
// runtime (Better Auth includes every configured additional field on every
|
||||
// user-returning endpoint) but missing from admin.d.ts's `UserWithRole` type.
|
||||
return users as Array<(typeof users)[number] & { phone: string | null }>
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user