Move to next-auth

This commit is contained in:
Jared Palmer 2023-05-22 10:16:09 -04:00
parent 3b8bb9dea4
commit a46b2ac3c6
10 changed files with 107 additions and 20 deletions

View file

@ -3,7 +3,7 @@ import { prisma } from "@/lib/prisma";
import { Chat } from "../../chat";
import { type Metadata } from "next";
import { getServerSession } from "@/lib/session/get-server-session";
import { auth } from "@/auth";
export interface ChatPageProps {
params: {
@ -29,7 +29,7 @@ export const runtime = "nodejs"; // default
export const preferredRegion = "home";
export const dynamic = "force-dynamic";
export default async function ChatPage({ params }: ChatPageProps) {
const session = await getServerSession();
const session = await auth();
const chat = await prisma.chat.findFirst({
where: {
id: params.id,