Add back vc auth temporarily to unblock things

This commit is contained in:
Jared Palmer 2023-05-19 14:13:38 -04:00
parent 07c2e7d36a
commit 177b2cc210
20 changed files with 350 additions and 40 deletions

View file

@ -1,12 +1,12 @@
"use server";
import { getServerSession } from "next-auth";
import { prisma } from "@/lib/prisma";
import { getServerSession } from "@/lib/session/get-server-session";
import { revalidatePath } from "next/cache";
import { authOptions } from "@/app/api/auth/[...nextauth]/route";
export async function removeChat({ id, path }: { id: string; path: string }) {
const session = await getServerSession(authOptions);
const session = await getServerSession();
const userId = session?.user?.email;
if (!userId || !id) {
throw new Error("Unauthorized");