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

Function action

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

Source from the content-addressed store, hash-verified

8import { logoutPath } from "~/utils/pathBuilder";
9
10export const action: ActionFunction = async ({ request }) => {
11 const projectId = await getCurrentProjectId(request);
12 if (projectId) {
13 const removeProjectIdSession = await clearCurrentProjectId(request);
14 return redirect(logoutPath(), {
15 headers: {
16 "Set-Cookie": await commitCurrentProjectSession(removeProjectIdSession),
17 },
18 });
19 }
20
21 return await authenticator.logout(request, { redirectTo: "/" });
22};
23
24export const loader: LoaderFunction = async ({ request }) => {
25 const projectId = await getCurrentProjectId(request);

Callers 2

useShortcutKeysFunction · 0.50
useChangedFunction · 0.50

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…