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

Function loader

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

Source from the content-addressed store, hash-verified

29export type SearchParams = z.infer<typeof SearchParams>;
30
31export const loader = async ({ request, params }: LoaderFunctionArgs) => {
32 const userId = await requireUserId(request);
33
34 const searchParams = createSearchParams(request.url, SearchParams);
35 if (!searchParams.success) {
36 throw new Error(searchParams.error);
37 }
38 const result = await adminGetOrganizations(userId, searchParams.params.getAll());
39
40 return typedjson(result);
41};
42
43const FormSchema = z.object({ id: z.string(), v3: z.enum(["enable", "disable"]) });
44

Callers

nothing calls this directly

Calls 4

requireUserIdFunction · 0.90
createSearchParamsFunction · 0.90
adminGetOrganizationsFunction · 0.90
getAllMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…