MCPcopy Index your code
hub / github.com/coder/coder / paginatedUsers

Function paginatedUsers

site/src/api/queries/users.ts:36–52  ·  view source on GitHub ↗
(
	searchParams: URLSearchParams,
)

Source from the content-addressed store, hash-verified

34}
35
36export function paginatedUsers(
37 searchParams: URLSearchParams,
38): UsePaginatedQueryOptions<GetUsersResponse, UsersRequest> {
39 return {
40 searchParams,
41 queryPayload: ({ limit, offset }) => {
42 return {
43 limit,
44 offset,
45 q: prepareQuery(searchParams.get("filter") ?? ""),
46 };
47 },
48
49 queryKey: ({ payload }) => usersKey(payload),
50 queryFn: ({ payload, signal }) => API.getUsers(payload, signal),
51 };
52}
53
54export const users = (req: UsersRequest): UseQueryOptions<GetUsersResponse> => {
55 return {

Callers 1

UsersPageFunction · 0.90

Calls 3

prepareQueryFunction · 0.90
usersKeyFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected