proper user/session creation and auth integration into UI

This commit is contained in:
old4ever committed 2025-08-19 03:40:06 -04:00
1 parent 1a13013b45
commit 12e9ec5d85
12 files changed
+726 -94

No files matched your search

+10
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 = `