MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / loader

Function loader

apps/webapp/app/routes/admin._index.tsx:34–44  ·  view source on GitHub ↗
({ request, params }: LoaderFunctionArgs)

Source from the content-addressed store, hash-verified

32export type SearchParams = z.infer<typeof SearchParams>;
33
34export const loader = async ({ request, params }: LoaderFunctionArgs) => {
35 const userId = await requireUserId(request);
36
37 const searchParams = createSearchParams(request.url, SearchParams);
38 if (!searchParams.success) {
39 throw new Error(searchParams.error);
40 }
41 const result = await adminGetUsers(userId, searchParams.params.getAll());
42
43 return typedjson(result);
44};
45
46const FormSchema = z.object({ id: z.string() });
47

Callers

nothing calls this directly

Calls 4

requireUserIdFunction · 0.90
createSearchParamsFunction · 0.90
adminGetUsersFunction · 0.90
getAllMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…