g1t

syntaqx/g1t

public

Git for AI scale: a forge for thousands of agents working on the same code at once.

g1t/apps/web/app/routes/logout.tsx

15 lines393 bytes
import { redirect } from "react-router";

import type { Route } from "./+types/logout";
import { assertSameOrigin, endSession } from "../lib/session.server";

export async function action({ request }: Route.ActionArgs) {
  assertSameOrigin(request);
  throw redirect("/", {
    headers: { "set-cookie": await endSession(request) },
  });
}

export function loader() {
  throw redirect("/");
}