MCPcopy Create free account
hub / github.com/triggerdotdev/trigger.dev / loader

Function loader

apps/webapp/app/routes/invites.tsx:20–30  ·  view source on GitHub ↗
({ request }: LoaderFunctionArgs)

Source from the content-addressed store, hash-verified

18import { invitesPath, rootPath } from "~/utils/pathBuilder";
19
20export const loader = async ({ request }: LoaderFunctionArgs) => {
21 const user = await requireUser(request);
22
23 //if there are no invites left we should redirect to the orgs page
24 const invites = await getUsersInvites({ email: user.email });
25 if (invites.length === 0) {
26 throw redirect(rootPath());
27 }
28
29 return typedjson({ invites });
30};
31
32const schema = z.object({
33 inviteId: z.string(),

Callers

nothing calls this directly

Calls 3

requireUserFunction · 0.90
getUsersInvitesFunction · 0.90
rootPathFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…