Files
lms-sb/src/app/(student)/wrapped/page.tsx
T
admins 06b8d9f64b Add Obsidian Wrapped feature (inside-LMS, client-side vault parsing)
- 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>
2026-06-23 14:19:59 +05:00

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} />;
}