refactor: migrate session usage to better-auth API

This commit is contained in:
2026-04-06 22:41:57 -04:00
parent d7d52ef1a8
commit 15be2399c6
3 changed files with 14 additions and 14 deletions

View File

@@ -1,8 +1,11 @@
import { NextResponse } from "next/server";
import { auth } from "@/auth";
import { headers } from "next/headers";
export async function POST(request: Request) {
const session = await auth();
const session = await auth.api.getSession({
headers: await headers(),
});
if (!session?.user) {
return NextResponse.json(