06b8d9f64b
- WrappedRun Prisma model + migration (aggregates only, no note names/text) - /wrapped authed route: FSA + webkitdirectory + drag-drop reader, Web Worker parser - archetype + score heuristics, ДС-2 result card - POST /api/wrapped/run (userId from session), public /share/wrapped/[token] - next/og OG image (Satori+resvg-wasm, alpine-safe) + Fira Mono ttf - middleware: /share/wrapped public Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
12 lines
539 B
TypeScript
12 lines
539 B
TypeScript
import { headers } from "next/headers";
|
|
import { auth } from "@/lib/auth";
|
|
import { redirect } from "next/navigation";
|
|
import { WrappedClient } from "./WrappedClient";
|
|
|
|
// Авторизованный генератор Obsidian Wrapped. Гость → /register (приток из публичной карточки).
|
|
export default async function WrappedPage() {
|
|
const session = await auth.api.getSession({ headers: await headers() });
|
|
if (!session) redirect("/register");
|
|
return <WrappedClient userName={session.user.name} />;
|
|
}
|