🎉 initial commit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { createServerFn } from '@tanstack/react-start'
|
||||
|
||||
export const listStaffMembers = createServerFn({ method: 'GET' }).handler(async () => {
|
||||
const [{ getAuth }, { getRequest }] = await Promise.all([
|
||||
import('#/lib/auth-instance'),
|
||||
import('@tanstack/react-start/server'),
|
||||
])
|
||||
|
||||
const { users } = await getAuth().api.listUsers({
|
||||
headers: getRequest().headers,
|
||||
query: { sortBy: 'createdAt', sortDirection: 'asc', limit: 100 },
|
||||
})
|
||||
|
||||
return users
|
||||
})
|
||||
Reference in New Issue
Block a user