cg / hackerproducts
64 files · 5,803 lines · 161.0 KB — Next.js 15, React 19, TypeScript, PostgreSQL, Object Storage, plain CSS.
Quick jump: page.tsxpage.tsxglobals.cssschema.sqlpackage.json
root / src / app / api / auth / logout / route.ts
src/app/api/auth/logout/route.ts · 8 lines · 226 B← back to folder
| 1 | import { NextResponse } from "next/server"; |
| 2 | import { destroySession, getSiteUrl } from "@/lib/auth"; |
| 3 | |
| 4 | export async function POST() { |
| 5 | await destroySession(); |
| 6 | return NextResponse.redirect(new URL("/", getSiteUrl()), 303); |
| 7 | } |
| 8 |