({ request })
| 8 | import { logoutPath } from "~/utils/pathBuilder"; |
| 9 | |
| 10 | export 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 | |
| 24 | export const loader: LoaderFunction = async ({ request }) => { |
| 25 | const projectId = await getCurrentProjectId(request); |
no test coverage detected
searching dependent graphs…