Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| Account settings in the same shape as a workspace's | 1 | import { redirect } from "react-router"; |
| 2 | ||
| 3 | import type { Route } from "./+types/logout"; | |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 4 | import { assertSameOrigin, endSession, nextPath } from "../lib/session.server"; |
| Account settings in the same shape as a workspace's | 5 | |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 6 | /** |
| 7 | * Signs out, then goes home, or to `next` (a path on g1t only): "Switch | |
| 8 | * account" signs out to the sign-in page, which brings them back. | |
| 9 | */ | |
| Account settings in the same shape as a workspace's | 10 | export async function action({ request }: Route.ActionArgs) { |
| 11 | assertSameOrigin(request); | |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 12 | throw redirect(nextPath(request), { |
| Account settings in the same shape as a workspace's | 13 | headers: { "set-cookie": await endSession(request) }, |
| 14 | }); | |
| 15 | } | |
| 16 | ||
| 17 | export function loader() { | |
| 18 | throw redirect("/"); | |
| 19 | } |
This file's history is long; its oldest lines are credited to the oldest commit read.