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

Function loader

apps/webapp/app/routes/logout.tsx:24–36  ·  view source on GitHub ↗
({ request })

Source from the content-addressed store, hash-verified

22};
23
24export const loader: LoaderFunction = async ({ request }) => {
25 const projectId = await getCurrentProjectId(request);
26 if (projectId) {
27 const removeProjectIdSession = await clearCurrentProjectId(request);
28 return redirect(logoutPath(), {
29 headers: {
30 "Set-Cookie": await commitCurrentProjectSession(removeProjectIdSession),
31 },
32 });
33 }
34
35 return await authenticator.logout(request, { redirectTo: "/" });
36};

Callers

nothing calls this directly

Calls 4

getCurrentProjectIdFunction · 0.90
clearCurrentProjectIdFunction · 0.90
logoutPathFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…