proper user/session creation and auth integration into UI

This commit is contained in:
2025-08-19 03:40:06 -04:00
parent 1a13013b45
commit 12e9ec5d85
12 changed files with 726 additions and 94 deletions

View File

@@ -1,6 +1,16 @@
import { NextResponse } from "next/server";
import { auth } from "@/auth";
export async function POST(request: Request) {
const session = await auth();
if (!session?.user) {
return NextResponse.json(
{ error: "Authentication required" },
{ status: 401 }
);
}
const { prompt } = await request.json();
const systemPrompt = `